Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 18th, 2013  |  syntax: None  |  size: 0.87 KB  |  views: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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