SQL Exercise1
SQL Exercise1
EMPNO CHAR(4)
EMPNAME CHAR(20)
BASIC FLOAT
DEPTNO CHAR(2)
DEPTHEAD CHAR(4)
DEPTNO CHAR(2)
DEPTNAME CHAR(15)
10, Development
20, Training
Sameer Dehadrai
Create S, P, J, SPJ tables as specified below and insert a few rows in each table:-
SUPPLIER - S
(S#, Sname, Status, City)
PARTS - P
(P#, Pname, Color, Weight, City)
PROJECTS - J
(J#, Jname, City)
SUPPLIER-PARTS-PROJECT - SPJ
(S#, P#, J#, Qty)
7. Display the PNAME and COLOR from the P table for the CITY=”London”.
11. Display all the Partnames with the weight between 12 and 14 (inclusive of both).
12. Display all the Suppliers with a Status greater than or equal to 20.
13. Display all the Suppliers except the Suppliers from London.
14. Display only the Cities from where the Suppliers come from.
15. Assuming that the Part Weight is in GRAMS, display the same in
MILLIGRAMS and KILOGRAMS.
Sameer Dehadrai