Lab01: Advance SQL 1: TIS3351 Advance Database Oct2014
Lab01: Advance SQL 1: TIS3351 Advance Database Oct2014
Advance Database
Oct2014
Figure 1. Entity Relationship Diagram for Pine Valley Furniture (version 1).
TIS3351
Advance Database
Oct2014
CustFname varchar(20),
CustLname varchar(20),
PRIMARY KEY(CustID)
);
To see the changes, you may display the table structure you have just
defined:
SELECT * FROM customer;
CustLna
me
Green
Bold
PRODUCT
ProdID
ProdName
C01
D05
Chair
Desk
ProdPri
ce
250.00
360.00
CustID
ORDERDETAIL
OrderID ProdID
Quantity
11
C01
QtyOnHa
nd
default
35
TIS3351
12
Advance Database
05-242014
Oct2014
11
D05
12
12
D05
C01
1
1
7. Gary (OrderID 12) actually buys 2 desks. Update the desk (D05) Quantity
bought by Gary.
8. Delete from ORDERDETAIL where the OrderID is 12 and ProdID is CO1.
9. Now, can you delete a customer named Linda? Why can or can not?