-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbamazon.sql
More file actions
28 lines (23 loc) · 836 Bytes
/
bamazon.sql
File metadata and controls
28 lines (23 loc) · 836 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
DROP DATABASE IF EXISTS bamazon;
CREATE database bamazon;
USE bamazon;
CREATE TABLE products(
item_id INT(4) NOT NULL,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(100) NOT NULL,
price DECIMAL(10,2) NOT NULL,
stock_quantity INT(20) NOT NULL,
PRIMARY KEY (item_id)
);
Select * FROM products;
INSERT INTO products (item_id, product_name, department_name, price, stock_quantity)
VALUES (101, "boots", "soccer", 79.99, 20),
(212, "jerseys", "basketball", 99.99, 10),
(313, "helmet", "football", 29.99, 5),
(420, "sweater", "hockey", 129.99, 14),
(504, "pants", "football", 39.99, 15),
(619, "shorts", "soccer", 19.99, 19),
(720, "gloves", "baseball", 49.99, 11),
(808, "bats", "baseball", 69.99, 10),
(913, "pucks", "hockey", 9.99, 19),
(1009, "shoes", "basketball", 89.99, 17)