Advertisement
JamesDamico

Untitled

Oct 18th, 2019
522
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. DROP DATABASE IF EXISTS book_shop;
  2. CREATE DATABASE book_shop;
  3. USE book_shop;
  4.  
  5. CREATE TABLE books
  6. (
  7. book_id INT NOT NULL AUTO_INCREMENT,
  8. title VARCHAR(100),
  9. author_fname VARCHAR(100),
  10. author_lname VARCHAR(100),
  11. released_year INT,
  12. stock_quantity INT,
  13. pages INT,
  14. PRIMARY KEY(book_id)
  15. );
  16.  
  17. INSERT INTO books (title, author_fname, author_lname, released_year, stock_quantity, pages)
  18. VALUES
  19. ('The Namesake', 'Jhumpa', 'Lahiri', 2003, 32, 291),
  20. ('Norse Mythology', 'Neil', 'Gaiman',2016, 43, 304),
  21. ('American Gods', 'Neil', 'Gaiman', 2001, 12, 465),
  22. ('Interpreter of Maladies', 'Jhumpa', 'Lahiri', 1996, 97, 198),
  23. ('A Hologram for the King: A Novel', 'Dave', 'Eggers', 2012, 154, 352),
  24. ('The Circle', 'Dave', 'Eggers', 2013, 26, 504),
  25. ('The Amazing Adventures of Kavalier & Clay', 'Michael', 'Chabon', 2000, 68, 634),
  26. ('Just Kids', 'Patti', 'Smith', 2010, 55, 304),
  27. ('A Heartbreaking Work of Staggering Genius', 'Dave', 'Eggers', 2001, 104, 437),
  28. ('Coraline', 'Neil', 'Gaiman', 2003, 100, 208),
  29. ('What We Talk About When We Talk About Love: Stories', 'Raymond', 'Carver', 1981, 23, 176),
  30. ("Where I'm Calling From: Selected Stories", 'Raymond', 'Carver', 1989, 12, 526),
  31. ('White Noise', 'Don', 'DeLillo', 1985, 49, 320),
  32. ('Cannery Row', 'John', 'Steinbeck', 1945, 95, 181),
  33. ('Oblivion: Stories', 'David', 'Foster Wallace', 2004, 172, 329),
  34. ('Consider the Lobster', 'David', 'Foster Wallace', 2005, 92, 343);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement