-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathmysql_schemas.sql
22 lines (22 loc) · 1.8 KB
/
mysql_schemas.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Create table If Not Exists Customers (customer_id int, customer_name varchar(20), email varchar(30));
Create table If Not Exists Contacts (user_id int, contact_name varchar(20), contact_email varchar(30));
Create table If Not Exists Invoices (invoice_id int, price int, user_id int);
Truncate table Customers;
insert into Customers (customer_id, customer_name, email) values ('1', 'Alice', '[email protected]');
insert into Customers (customer_id, customer_name, email) values ('2', 'Bob', '[email protected]');
insert into Customers (customer_id, customer_name, email) values ('13', 'John', '[email protected]');
insert into Customers (customer_id, customer_name, email) values ('6', 'Alex', '[email protected]');
Truncate table Contacts;
insert into Contacts (user_id, contact_name, contact_email) values ('1', 'Bob', '[email protected]');
insert into Contacts (user_id, contact_name, contact_email) values ('1', 'John', '[email protected]');
insert into Contacts (user_id, contact_name, contact_email) values ('1', 'Jal', '[email protected]');
insert into Contacts (user_id, contact_name, contact_email) values ('2', 'Omar', '[email protected]');
insert into Contacts (user_id, contact_name, contact_email) values ('2', 'Meir', '[email protected]');
insert into Contacts (user_id, contact_name, contact_email) values ('6', 'Alice', '[email protected]');
Truncate table Invoices;
insert into Invoices (invoice_id, price, user_id) values ('77', '100', '1');
insert into Invoices (invoice_id, price, user_id) values ('88', '200', '1');
insert into Invoices (invoice_id, price, user_id) values ('99', '300', '2');
insert into Invoices (invoice_id, price, user_id) values ('66', '400', '2');
insert into Invoices (invoice_id, price, user_id) values ('55', '500', '13');
insert into Invoices (invoice_id, price, user_id) values ('44', '60', '6');