Advertisement
zinch

adress book table in MySQL

Apr 19th, 2014
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.48 KB | None | 0 0
  1. DROP DATABASE IF EXISTS addressBook;
  2.  
  3. CREATE DATABASE addressBook;
  4.  
  5. USE addressBook;
  6.  
  7. CREATE TABLE contact (
  8.     id INT NOT NULL AUTO_INCREMENT,
  9.     firstName VARCHAR(30) NOT NULL,
  10.     lastName VARCHAR(30),
  11.     email VARCHAR(30),
  12.     phoneNo VARCHAR(13),
  13.     PRIMARY KEY(id)
  14. );
  15.  
  16. INSERT INTO contact VALUES (
  17.     DEFAULT,
  18.     'Michael',
  19.     'Taylor',
  20.     'michael@abc.com',
  21.     "+919876543210"
  22. );
  23.  
  24. INSERT INTO contact VALUES (
  25.     DEFAULT,
  26.     'William',
  27.     'Becker',
  28.     'william@abc.com',
  29.     '+449876543210'
  30. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement