TheBulgarianWolf

SQL Tutorial

Dec 31st, 2020
1,991
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 16.75 KB | None | 0 0
  1. DROP DATABASE IF EXISTS `sql_invoicing`;
  2. CREATE DATABASE `sql_invoicing`;
  3. USE `sql_invoicing`;
  4.  
  5. SET NAMES utf8 ;
  6. SET character_set_client = utf8mb4 ;
  7.  
  8. CREATE TABLE `payment_methods` (
  9.   `payment_method_id` tinyint(4) NOT NULL AUTO_INCREMENT,
  10.   `name` varchar(50) NOT NULL,
  11.   PRIMARY KEY (`payment_method_id`)
  12. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  13. INSERT INTO `payment_methods` VALUES (1,'Credit Card');
  14. INSERT INTO `payment_methods` VALUES (2,'Cash');
  15. INSERT INTO `payment_methods` VALUES (3,'PayPal');
  16. INSERT INTO `payment_methods` VALUES (4,'Wire Transfer');
  17.  
  18. CREATE TABLE `clients` (
  19.   `client_id` int(11) NOT NULL,
  20.   `name` varchar(50) NOT NULL,
  21.   `address` varchar(50) NOT NULL,
  22.   `city` varchar(50) NOT NULL,
  23.   `state` char(2) NOT NULL,
  24.   `phone` varchar(50) DEFAULT NULL,
  25.   PRIMARY KEY (`client_id`)
  26. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  27. INSERT INTO `clients` VALUES (1,'Vinte','3 Nevada Parkway','Syracuse','NY','315-252-7305');
  28. INSERT INTO `clients` VALUES (2,'Myworks','34267 Glendale Parkway','Huntington','WV','304-659-1170');
  29. INSERT INTO `clients` VALUES (3,'Yadel','096 Pawling Parkway','San Francisco','CA','415-144-6037');
  30. INSERT INTO `clients` VALUES (4,'Kwideo','81674 Westerfield Circle','Waco','TX','254-750-0784');
  31. INSERT INTO `clients` VALUES (5,'Topiclounge','0863 Farmco Road','Portland','OR','971-888-9129');
  32.  
  33. CREATE TABLE `invoices` (
  34.   `invoice_id` int(11) NOT NULL,
  35.   `number` varchar(50) NOT NULL,
  36.   `client_id` int(11) NOT NULL,
  37.   `invoice_total` decimal(9,2) NOT NULL,
  38.   `payment_total` decimal(9,2) NOT NULL DEFAULT '0.00',
  39.   `invoice_date` date NOT NULL,
  40.   `due_date` date NOT NULL,
  41.   `payment_date` date DEFAULT NULL,
  42.   PRIMARY KEY (`invoice_id`),
  43.   KEY `FK_client_id` (`client_id`),
  44.   CONSTRAINT `FK_client_id` FOREIGN KEY (`client_id`) REFERENCES `clients` (`client_id`) ON DELETE RESTRICT ON UPDATE CASCADE
  45. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  46. INSERT INTO `invoices` VALUES (1,'91-953-3396',2,101.79,0.00,'2019-03-09','2019-03-29',NULL);
  47. INSERT INTO `invoices` VALUES (2,'03-898-6735',5,175.32,8.18,'2019-06-11','2019-07-01','2019-02-12');
  48. INSERT INTO `invoices` VALUES (3,'20-228-0335',5,147.99,0.00,'2019-07-31','2019-08-20',NULL);
  49. INSERT INTO `invoices` VALUES (4,'56-934-0748',3,152.21,0.00,'2019-03-08','2019-03-28',NULL);
  50. INSERT INTO `invoices` VALUES (5,'87-052-3121',5,169.36,0.00,'2019-07-18','2019-08-07',NULL);
  51. INSERT INTO `invoices` VALUES (6,'75-587-6626',1,157.78,74.55,'2019-01-29','2019-02-18','2019-01-03');
  52. INSERT INTO `invoices` VALUES (7,'68-093-9863',3,133.87,0.00,'2019-09-04','2019-09-24',NULL);
  53. INSERT INTO `invoices` VALUES (8,'78-145-1093',1,189.12,0.00,'2019-05-20','2019-06-09',NULL);
  54. INSERT INTO `invoices` VALUES (9,'77-593-0081',5,172.17,0.00,'2019-07-09','2019-07-29',NULL);
  55. INSERT INTO `invoices` VALUES (10,'48-266-1517',1,159.50,0.00,'2019-06-30','2019-07-20',NULL);
  56. INSERT INTO `invoices` VALUES (11,'20-848-0181',3,126.15,0.03,'2019-01-07','2019-01-27','2019-01-11');
  57. INSERT INTO `invoices` VALUES (13,'41-666-1035',5,135.01,87.44,'2019-06-25','2019-07-15','2019-01-26');
  58. INSERT INTO `invoices` VALUES (15,'55-105-9605',3,167.29,80.31,'2019-11-25','2019-12-15','2019-01-15');
  59. INSERT INTO `invoices` VALUES (16,'10-451-8824',1,162.02,0.00,'2019-03-30','2019-04-19',NULL);
  60. INSERT INTO `invoices` VALUES (17,'33-615-4694',3,126.38,68.10,'2019-07-30','2019-08-19','2019-01-15');
  61. INSERT INTO `invoices` VALUES (18,'52-269-9803',5,180.17,42.77,'2019-05-23','2019-06-12','2019-01-08');
  62. INSERT INTO `invoices` VALUES (19,'83-559-4105',1,134.47,0.00,'2019-11-23','2019-12-13',NULL);
  63.  
  64. CREATE TABLE `payments` (
  65.   `payment_id` int(11) NOT NULL AUTO_INCREMENT,
  66.   `client_id` int(11) NOT NULL,
  67.   `invoice_id` int(11) NOT NULL,
  68.   `date` date NOT NULL,
  69.   `amount` decimal(9,2) NOT NULL,
  70.   `payment_method` tinyint(4) NOT NULL,
  71.   PRIMARY KEY (`payment_id`),
  72.   KEY `fk_client_id_idx` (`client_id`),
  73.   KEY `fk_invoice_id_idx` (`invoice_id`),
  74.   KEY `fk_payment_payment_method_idx` (`payment_method`),
  75.   CONSTRAINT `fk_payment_client` FOREIGN KEY (`client_id`) REFERENCES `clients` (`client_id`) ON UPDATE CASCADE,
  76.   CONSTRAINT `fk_payment_invoice` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`invoice_id`) ON UPDATE CASCADE,
  77.   CONSTRAINT `fk_payment_payment_method` FOREIGN KEY (`payment_method`) REFERENCES `payment_methods` (`payment_method_id`)
  78. ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  79. INSERT INTO `payments` VALUES (1,5,2,'2019-02-12',8.18,1);
  80. INSERT INTO `payments` VALUES (2,1,6,'2019-01-03',74.55,1);
  81. INSERT INTO `payments` VALUES (3,3,11,'2019-01-11',0.03,1);
  82. INSERT INTO `payments` VALUES (4,5,13,'2019-01-26',87.44,1);
  83. INSERT INTO `payments` VALUES (5,3,15,'2019-01-15',80.31,1);
  84. INSERT INTO `payments` VALUES (6,3,17,'2019-01-15',68.10,1);
  85. INSERT INTO `payments` VALUES (7,5,18,'2019-01-08',32.77,1);
  86. INSERT INTO `payments` VALUES (8,5,18,'2019-01-08',10.00,2);
  87.  
  88.  
  89. DROP DATABASE IF EXISTS `sql_store`;
  90. CREATE DATABASE `sql_store`;
  91. USE `sql_store`;
  92.  
  93. CREATE TABLE `products` (
  94.   `product_id` int(11) NOT NULL AUTO_INCREMENT,
  95.   `name` varchar(50) NOT NULL,
  96.   `quantity_in_stock` int(11) NOT NULL,
  97.   `unit_price` decimal(4,2) NOT NULL,
  98.   PRIMARY KEY (`product_id`)
  99. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  100. INSERT INTO `products` VALUES (1,'Foam Dinner Plate',70,1.21);
  101. INSERT INTO `products` VALUES (2,'Pork - Bacon,back Peameal',49,4.65);
  102. INSERT INTO `products` VALUES (3,'Lettuce - Romaine, Heart',38,3.35);
  103. INSERT INTO `products` VALUES (4,'Brocolinni - Gaylan, Chinese',90,4.53);
  104. INSERT INTO `products` VALUES (5,'Sauce - Ranch Dressing',94,1.63);
  105. INSERT INTO `products` VALUES (6,'Petit Baguette',14,2.39);
  106. INSERT INTO `products` VALUES (7,'Sweet Pea Sprouts',98,3.29);
  107. INSERT INTO `products` VALUES (8,'Island Oasis - Raspberry',26,0.74);
  108. INSERT INTO `products` VALUES (9,'Longan',67,2.26);
  109. INSERT INTO `products` VALUES (10,'Broom - Push',6,1.09);
  110.  
  111.  
  112. CREATE TABLE `shippers` (
  113.   `shipper_id` smallint(6) NOT NULL AUTO_INCREMENT,
  114.   `name` varchar(50) NOT NULL,
  115.   PRIMARY KEY (`shipper_id`)
  116. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  117. INSERT INTO `shippers` VALUES (1,'Hettinger LLC');
  118. INSERT INTO `shippers` VALUES (2,'Schinner-Predovic');
  119. INSERT INTO `shippers` VALUES (3,'Satterfield LLC');
  120. INSERT INTO `shippers` VALUES (4,'Mraz, Renner and Nolan');
  121. INSERT INTO `shippers` VALUES (5,'Waters, Mayert and Prohaska');
  122.  
  123.  
  124. CREATE TABLE `customers` (
  125.   `customer_id` int(11) NOT NULL AUTO_INCREMENT,
  126.   `first_name` varchar(50) NOT NULL,
  127.   `last_name` varchar(50) NOT NULL,
  128.   `birth_date` date DEFAULT NULL,
  129.   `phone` varchar(50) DEFAULT NULL,
  130.   `address` varchar(50) NOT NULL,
  131.   `city` varchar(50) NOT NULL,
  132.   `state` char(2) NOT NULL,
  133.   `points` int(11) NOT NULL DEFAULT '0',
  134.   PRIMARY KEY (`customer_id`)
  135. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  136. INSERT INTO `customers` VALUES (1,'Babara','MacCaffrey','1986-03-28','781-932-9754','0 Sage Terrace','Waltham','MA',2273);
  137. INSERT INTO `customers` VALUES (2,'Ines','Brushfield','1986-04-13','804-427-9456','14187 Commercial Trail','Hampton','VA',947);
  138. INSERT INTO `customers` VALUES (3,'Freddi','Boagey','1985-02-07','719-724-7869','251 Springs Junction','Colorado Springs','CO',2967);
  139. INSERT INTO `customers` VALUES (4,'Ambur','Roseburgh','1974-04-14','407-231-8017','30 Arapahoe Terrace','Orlando','FL',457);
  140. INSERT INTO `customers` VALUES (5,'Clemmie','Betchley','1973-11-07',NULL,'5 Spohn Circle','Arlington','TX',3675);
  141. INSERT INTO `customers` VALUES (6,'Elka','Twiddell','1991-09-04','312-480-8498','7 Manley Drive','Chicago','IL',3073);
  142. INSERT INTO `customers` VALUES (7,'Ilene','Dowson','1964-08-30','615-641-4759','50 Lillian Crossing','Nashville','TN',1672);
  143. INSERT INTO `customers` VALUES (8,'Thacher','Naseby','1993-07-17','941-527-3977','538 Mosinee Center','Sarasota','FL',205);
  144. INSERT INTO `customers` VALUES (9,'Romola','Rumgay','1992-05-23','559-181-3744','3520 Ohio Trail','Visalia','CA',1486);
  145. INSERT INTO `customers` VALUES (10,'Levy','Mynett','1969-10-13','404-246-3370','68 Lawn Avenue','Atlanta','GA',796);
  146.  
  147.  
  148. CREATE TABLE `order_statuses` (
  149.   `order_status_id` tinyint(4) NOT NULL,
  150.   `name` varchar(50) NOT NULL,
  151.   PRIMARY KEY (`order_status_id`)
  152. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  153. INSERT INTO `order_statuses` VALUES (1,'Processed');
  154. INSERT INTO `order_statuses` VALUES (2,'Shipped');
  155. INSERT INTO `order_statuses` VALUES (3,'Delivered');
  156.  
  157.  
  158. CREATE TABLE `orders` (
  159.   `order_id` int(11) NOT NULL AUTO_INCREMENT,
  160.   `customer_id` int(11) NOT NULL,
  161.   `order_date` date NOT NULL,
  162.   `status` tinyint(4) NOT NULL DEFAULT '1',
  163.   `comments` varchar(2000) DEFAULT NULL,
  164.   `shipped_date` date DEFAULT NULL,
  165.   `shipper_id` smallint(6) DEFAULT NULL,
  166.   PRIMARY KEY (`order_id`),
  167.   KEY `fk_orders_customers_idx` (`customer_id`),
  168.   KEY `fk_orders_shippers_idx` (`shipper_id`),
  169.   KEY `fk_orders_order_statuses_idx` (`status`),
  170.   CONSTRAINT `fk_orders_customers` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`customer_id`) ON UPDATE CASCADE,
  171.   CONSTRAINT `fk_orders_order_statuses` FOREIGN KEY (`status`) REFERENCES `order_statuses` (`order_status_id`) ON UPDATE CASCADE,
  172.   CONSTRAINT `fk_orders_shippers` FOREIGN KEY (`shipper_id`) REFERENCES `shippers` (`shipper_id`) ON UPDATE CASCADE
  173. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  174. INSERT INTO `orders` VALUES (1,6,'2019-01-30',1,NULL,NULL,NULL);
  175. INSERT INTO `orders` VALUES (2,7,'2018-08-02',2,NULL,'2018-08-03',4);
  176. INSERT INTO `orders` VALUES (3,8,'2017-12-01',1,NULL,NULL,NULL);
  177. INSERT INTO `orders` VALUES (4,2,'2017-01-22',1,NULL,NULL,NULL);
  178. INSERT INTO `orders` VALUES (5,5,'2017-08-25',2,'','2017-08-26',3);
  179. INSERT INTO `orders` VALUES (6,10,'2018-11-18',1,'Aliquam erat volutpat. In congue.',NULL,NULL);
  180. INSERT INTO `orders` VALUES (7,2,'2018-09-22',2,NULL,'2018-09-23',4);
  181. INSERT INTO `orders` VALUES (8,5,'2018-06-08',1,'Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis.',NULL,NULL);
  182. INSERT INTO `orders` VALUES (9,10,'2017-07-05',2,'Nulla mollis molestie lorem. Quisque ut erat.','2017-07-06',1);
  183. INSERT INTO `orders` VALUES (10,6,'2018-04-22',2,NULL,'2018-04-23',2);
  184.  
  185.  
  186. CREATE TABLE `order_items` (
  187.   `order_id` int(11) NOT NULL AUTO_INCREMENT,
  188.   `product_id` int(11) NOT NULL,
  189.   `quantity` int(11) NOT NULL,
  190.   `unit_price` decimal(4,2) NOT NULL,
  191.   PRIMARY KEY (`order_id`,`product_id`),
  192.   KEY `fk_order_items_products_idx` (`product_id`),
  193.   CONSTRAINT `fk_order_items_orders` FOREIGN KEY (`order_id`) REFERENCES `orders` (`order_id`) ON UPDATE CASCADE,
  194.   CONSTRAINT `fk_order_items_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`product_id`) ON UPDATE CASCADE
  195. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  196. INSERT INTO `order_items` VALUES (1,4,4,3.74);
  197. INSERT INTO `order_items` VALUES (2,1,2,9.10);
  198. INSERT INTO `order_items` VALUES (2,4,4,1.66);
  199. INSERT INTO `order_items` VALUES (2,6,2,2.94);
  200. INSERT INTO `order_items` VALUES (3,3,10,9.12);
  201. INSERT INTO `order_items` VALUES (4,3,7,6.99);
  202. INSERT INTO `order_items` VALUES (4,10,7,6.40);
  203. INSERT INTO `order_items` VALUES (5,2,3,9.89);
  204. INSERT INTO `order_items` VALUES (6,1,4,8.65);
  205. INSERT INTO `order_items` VALUES (6,2,4,3.28);
  206. INSERT INTO `order_items` VALUES (6,3,4,7.46);
  207. INSERT INTO `order_items` VALUES (6,5,1,3.45);
  208. INSERT INTO `order_items` VALUES (7,3,7,9.17);
  209. INSERT INTO `order_items` VALUES (8,5,2,6.94);
  210. INSERT INTO `order_items` VALUES (8,8,2,8.59);
  211. INSERT INTO `order_items` VALUES (9,6,5,7.28);
  212. INSERT INTO `order_items` VALUES (10,1,10,6.01);
  213. INSERT INTO `order_items` VALUES (10,9,9,4.28);
  214.  
  215. CREATE TABLE `sql_store`.`order_item_notes` (
  216.   `note_id` INT NOT NULL,
  217.   `order_Id` INT NOT NULL,
  218.   `product_id` INT NOT NULL,
  219.   `note` VARCHAR(255) NOT NULL,
  220.   PRIMARY KEY (`note_id`));
  221.  
  222. INSERT INTO `order_item_notes` (`note_id`, `order_Id`, `product_id`, `note`) VALUES ('1', '1', '2', 'first note');
  223. INSERT INTO `order_item_notes` (`note_id`, `order_Id`, `product_id`, `note`) VALUES ('2', '1', '2', 'second note');
  224.  
  225.  
  226. DROP DATABASE IF EXISTS `sql_hr`;
  227. CREATE DATABASE `sql_hr`;
  228. USE `sql_hr`;
  229.  
  230.  
  231. CREATE TABLE `offices` (
  232.   `office_id` int(11) NOT NULL,
  233.   `address` varchar(50) NOT NULL,
  234.   `city` varchar(50) NOT NULL,
  235.   `state` varchar(50) NOT NULL,
  236.   PRIMARY KEY (`office_id`)
  237. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  238. INSERT INTO `offices` VALUES (1,'03 Reinke Trail','Cincinnati','OH');
  239. INSERT INTO `offices` VALUES (2,'5507 Becker Terrace','New York City','NY');
  240. INSERT INTO `offices` VALUES (3,'54 Northland Court','Richmond','VA');
  241. INSERT INTO `offices` VALUES (4,'08 South Crossing','Cincinnati','OH');
  242. INSERT INTO `offices` VALUES (5,'553 Maple Drive','Minneapolis','MN');
  243. INSERT INTO `offices` VALUES (6,'23 North Plaza','Aurora','CO');
  244. INSERT INTO `offices` VALUES (7,'9658 Wayridge Court','Boise','ID');
  245. INSERT INTO `offices` VALUES (8,'9 Grayhawk Trail','New York City','NY');
  246. INSERT INTO `offices` VALUES (9,'16862 Westend Hill','Knoxville','TN');
  247. INSERT INTO `offices` VALUES (10,'4 Bluestem Parkway','Savannah','GA');
  248.  
  249.  
  250.  
  251. CREATE TABLE `employees` (
  252.   `employee_id` int(11) NOT NULL,
  253.   `first_name` varchar(50) NOT NULL,
  254.   `last_name` varchar(50) NOT NULL,
  255.   `job_title` varchar(50) NOT NULL,
  256.   `salary` int(11) NOT NULL,
  257.   `reports_to` int(11) DEFAULT NULL,
  258.   `office_id` int(11) NOT NULL,
  259.   PRIMARY KEY (`employee_id`),
  260.   KEY `fk_employees_offices_idx` (`office_id`),
  261.   KEY `fk_employees_employees_idx` (`reports_to`),
  262.   CONSTRAINT `fk_employees_managers` FOREIGN KEY (`reports_to`) REFERENCES `employees` (`employee_id`),
  263.   CONSTRAINT `fk_employees_offices` FOREIGN KEY (`office_id`) REFERENCES `offices` (`office_id`) ON UPDATE CASCADE
  264. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  265. INSERT INTO `employees` VALUES (37270,'Yovonnda','Magrannell','Executive Secretary',63996,NULL,10);
  266. INSERT INTO `employees` VALUES (33391,'D\'arcy','Nortunen','Account Executive',62871,37270,1);
  267. INSERT INTO `employees` VALUES (37851,'Sayer','Matterson','Statistician III',98926,37270,1);
  268. INSERT INTO `employees` VALUES (40448,'Mindy','Crissil','Staff Scientist',94860,37270,1);
  269. INSERT INTO `employees` VALUES (56274,'Keriann','Alloisi','VP Marketing',110150,37270,1);
  270. INSERT INTO `employees` VALUES (63196,'Alaster','Scutchin','Assistant Professor',32179,37270,2);
  271. INSERT INTO `employees` VALUES (67009,'North','de Clerc','VP Product Management',114257,37270,2);
  272. INSERT INTO `employees` VALUES (67370,'Elladine','Rising','Social Worker',96767,37270,2);
  273. INSERT INTO `employees` VALUES (68249,'Nisse','Voysey','Financial Advisor',52832,37270,2);
  274. INSERT INTO `employees` VALUES (72540,'Guthrey','Iacopetti','Office Assistant I',117690,37270,3);
  275. INSERT INTO `employees` VALUES (72913,'Kass','Hefferan','Computer Systems Analyst IV',96401,37270,3);
  276. INSERT INTO `employees` VALUES (75900,'Virge','Goodrum','Information Systems Manager',54578,37270,3);
  277. INSERT INTO `employees` VALUES (76196,'Mirilla','Janowski','Cost Accountant',119241,37270,3);
  278. INSERT INTO `employees` VALUES (80529,'Lynde','Aronson','Junior Executive',77182,37270,4);
  279. INSERT INTO `employees` VALUES (80679,'Mildrid','Sokale','Geologist II',67987,37270,4);
  280. INSERT INTO `employees` VALUES (84791,'Hazel','Tarbert','General Manager',93760,37270,4);
  281. INSERT INTO `employees` VALUES (95213,'Cole','Kesterton','Pharmacist',86119,37270,4);
  282. INSERT INTO `employees` VALUES (96513,'Theresa','Binney','Food Chemist',47354,37270,5);
  283. INSERT INTO `employees` VALUES (98374,'Estrellita','Daleman','Staff Accountant IV',70187,37270,5);
  284. INSERT INTO `employees` VALUES (115357,'Ivy','Fearey','Structural Engineer',92710,37270,5);
  285.  
  286.  
  287. DROP DATABASE IF EXISTS `sql_inventory`;
  288. CREATE DATABASE `sql_inventory`;
  289. USE `sql_inventory`;
  290.  
  291.  
  292. CREATE TABLE `products` (
  293.  `product_id` int(11) NOT NULL AUTO_INCREMENT,
  294.  `name` varchar(50) NOT NULL,
  295.  `quantity_in_stock` int(11) NOT NULL,
  296.  `unit_price` decimal(4,2) NOT NULL,
  297.  PRIMARY KEY (`product_id`)
  298. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  299. INSERT INTO `products` VALUES (1,'Foam Dinner Plate',70,1.21);
  300. INSERT INTO `products` VALUES (2,'Pork - Bacon,back Peameal',49,4.65);
  301. INSERT INTO `products` VALUES (3,'Lettuce - Romaine, Heart',38,3.35);
  302. INSERT INTO `products` VALUES (4,'Brocolinni - Gaylan, Chinese',90,4.53);
  303. INSERT INTO `products` VALUES (5,'Sauce - Ranch Dressing',94,1.63);
  304. INSERT INTO `products` VALUES (6,'Petit Baguette',14,2.39);
  305. INSERT INTO `products` VALUES (7,'Sweet Pea Sprouts',98,3.29);
  306. INSERT INTO `products` VALUES (8,'Island Oasis - Raspberry',26,0.74);
  307. INSERT INTO `products` VALUES (9,'Longan',67,2.26);
  308. INSERT INTO `products` VALUES (10,'Broom - Push',6,1.09);
Add Comment
Please, Sign In to add comment