-
Notifications
You must be signed in to change notification settings - Fork 178
Expand file tree
/
Copy pathtest.sql
More file actions
18 lines (14 loc) · 778 Bytes
/
test.sql
File metadata and controls
18 lines (14 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# check if database exists
USE ShopDB;
# check if table "Products" exists, all required columnts are in place, and have correct types
INSERT INTO Products (Name, Description, Price, WarehouseAmount)
VALUES ('Product', 'Product Desctiption', 5, 42);
# check if table "Customers" exists, all required columns are in place, and have correct types
INSERT INTO Customers (FirstName, LastName, Email, Address)
VALUES ('John', 'Dou', 'j@dou.ua', 'far, far away');
# check if table "Orders" exists, all required columns are in place, and have correct types
INSERT INTO Orders (CustomerID, Date)
VALUES (1, '2023-01-01');
# check if table "OrderItems" exists, all required columns are in place, and have correct types
INSERT INTO OrderItems (OrderID, ProductID)
VALUES (1, 1);