SHARE
TWEET

Untitled

a guest Feb 17th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE DATABASE DA;
  2.  
  3. CREATE TABLE DA.Users
  4. (
  5. UserID int AUTO_INCREMENT PRIMARY KEY,
  6. Name varchar(150),
  7. Sex varchar(20),
  8. Email varchar(150),
  9. Telephone int,
  10. Adress varchar(150),
  11. Locality varchar(150),
  12. Birthday int,
  13. Zipcode int,
  14. CCnum int,
  15. Isadmin bit
  16. ) engine = INNODB;
  17.  
  18. CREATE TABLE DA.Zipcodes
  19. (
  20. Zipcode int PRIMARY KEY,
  21. Locality varchar(150),
  22. FOREIGN KEY (FK_ZipZipcode, UserID)
  23.     REFERENCES DA.Users (UserID),
  24. FOREIGN KEY (FK_LocalityLocality, UserID)
  25.     REFERENCES DA.Users (UserID)
  26. ) engine = INNODB;
RAW Paste Data
Pastebin PRO Summer Special!
Get 60% OFF on Pastebin PRO accounts!
Top