-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbamazon_DB.sql
More file actions
29 lines (29 loc) · 824 Bytes
/
bamazon_DB.sql
File metadata and controls
29 lines (29 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
DROP DATABASE IF EXISTS bamazon_DB;
CREATE DATABASE bamazon_DB;
USE bamazon_DB;
CREATE TABLE products (
item_id INT AUTO_INCREMENT,
product_name VARCHAR(50) NOT NULL,
department_name VARCHAR(50) NOT NULL,
price INT(10) NOT NULL,
stock_quantity INT(10) NOT NULL,
PRIMARY KEY (item_id)
);
INSERT INTO
products (
product_name,
department_name,
price,
stock_quantity
)
VALUES
("iphone11", "Electronic", 699, 30),
("iphone11pro", "Electronic", 999, 30),
("sushi combo", "Food", 50, 20),
("hot pot", "Food", 60, 10),
("basketball", "sports", 20, 30),
("baseball", "sports", 5, 200),
("github-tshirt", "clothes", 20, 1000),
("ironman-suit", "clothes", 2000000, 3),
("manatee", "pet", 20000, 5),
("Mew", "pokemon", 200000000, 1)