- Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSampleData.sql
More file actions
Latest commit
17 lines (12 loc) · 639 Bytes
/
Copy pathSampleData.sql
File metadata and controls
17 lines (12 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
USE PurchaseSampleDb;
DROPTABLE Customers;
DROPTABLE Products;
CREATETABLECustomers(CustomerId INTPRIMARY KEY IDENTITY, CustomerName VARCHAR(50), Visits INT);
CREATETABLEProducts(ProductId INTPRIMARY KEY IDENTITY, ProductName VARCHAR(50), Availability INT, Price DECIMAL, MaxDiscountPercentage DECIMAL);
INSERT INTO Customers VALUES('Customer1', 10);
INSERT INTO Customers VALUES('Customer2', 5);
INSERT INTO Customers VALUES('Customer3', 7);
INSERT INTO Products VALUES('Product1', 250, 10, 3);
INSERT INTO Products VALUES('Product2', 300, 2, 10);
INSERT INTO Products VALUES('Product3', 450, 5, 12);
SELECT*FROM Products;