Guest User

Untitled

a guest
Feb 18th, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. CREATE TABLE people (
  2. ident NCHAR(7) NOT NULL UNIQUE,
  3. first_name NVARCHAR(100) NOT NULL,
  4. last_name NVARCHAR(100) NOT NULL,
  5. notes NVARCHAR(4000) NULL,
  6. birth_year SMALLINT NULL,
  7. birth_location NVARCHAR(200) NULL,
  8. amount SMALLINT NULL,
  9. location NCHAR(6) NOT NULL,
  10. title_date INT NOT NULL,
  11. num INT NOT NULL UNIQUE,
  12. PRIMARY KEY (ident)
  13. );
  14.  
  15. INSERT INTO people (ident, first_name, last_name, notes, birth_year, birth_location, amount, location, title_date, num)
  16. VALUES ('t1bbbee', 'Sam', 'Simpson', 'HKiONV6JGxKdd2qs5pQ3GGWlrSPRSfu19cJ6zyEn2qT1WHyv5N', 2007, 'N6fCeYVqJcjDov9DDmLfkpYtGs0WV4QeSVRaKm659lw52W21TX', 1143, 'YcbKbv', 19805274, 7735)
  17.  
  18. SELECT p.ident + "-" + p.first_name + " " + p.last_name AS "name"
  19. FROM people AS p
  20. ORDER BY p.ident
  21.  
  22. SELECT p.ident + '-' + p.first_name + ' ' + p.last_name name
  23. FROM people AS p
  24. ORDER BY p.ident
Add Comment
Please, Sign In to add comment