-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathinsert_data.sql
More file actions
33 lines (28 loc) · 1.01 KB
/
insert_data.sql
File metadata and controls
33 lines (28 loc) · 1.01 KB
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
30
31
32
33
-- SQL script to insert sample data
-- INSERT data into in customer table
INSERT INTO mini_mart.customers (
name,
email
) VALUES
('Chidubem Celestine', '[email protected]'),
('Charles John', '[email protected]'),
('John Dean', '[email protected]'),
('Jane Robinson', '[email protected]'),
('Joseph Gates', '[email protected]');
-- Insert 5 rows into the products table
-- Note: product_id is auto-generated by the database
INSERT INTO mini_mart.products (product_name, category, price) VALUES
('Organic Apples', 'Groceries', 3.50),
('Whole Wheat Bread', 'Bakery', 4.25),
('Cheddar Cheese Block', 'Dairy', 7.99),
('Free-Range Eggs (Dozen)', 'Dairy', 5.49),
('Natural Peanut Butter', 'Pantry', 6.00);
-- Insert 5 rows into the orders table
-- This connects customers to products.
-- Note: order_id and order_date are auto-generated.
INSERT INTO mini_mart.orders (customer_id, product_id, quantity) VALUES
(1, 2, 1),
(2, 5, 2),
(1, 4, 1),
(3, 1, 5),
(4, 3, 1);