Advertisement
Guest User

Untitled

a guest
May 6th, 2015
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.17 KB | None | 0 0
  1. CREATE TABLE weapon(
  2.     damage INT,
  3.     name text
  4. );
  5.  
  6. INSERT INTO weapon VALUES
  7. (12, 'dagger'),
  8. (20, 'sword'),
  9. (25, 'battleaxe');
  10.  
  11. SELECT json_agg(weapon.*) FROM weapon;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement