Database Reference
In-Depth Information
Review Questions
1. Explain why SQL is important to database development.
2. What is the SQL extension used in SQL Server?
3. What are the tasks that can be done by DDL?
4. What are the commonly used DDL commands?
5. What are the tasks that can be done by DCL?
6. What are the commonly used DCL commands?
7. What are the tasks that can be carried out by DML?
8. What are the commonly used DML commands?
9. Create the table ORDER( OrderId , OrderDate, ShippingCharge, Total).
10. Write an SQL statement to create a table called COMPUTER with the deinition
COMPUTER( ComputerId , Maker, Model, Price).
11. Write an SQL statement to create a table with the following information:
HARDDRIVE( SerialNumber , Maker, Model, Price).
12. Write an SQL statement to create a table with the following information:
ORDER_HARDDRIVE( SerialNumber , OrderId )
13. Write an SQL statement to create a table with the following information:
ORDER_COMPUTER( OrderId , ComputerId ).
14. Alter the table HARDDRIVE by adding a new column Description with CHAR(100) data
type.
15. Use the INSERT statement to insert the following information into the table HARDDRIVE:
11111
KEM
TI20GB
168
12293
QVT
SL40GB
243
23412
TTP
FK100GB
405
16. For the table HARDDRIVE, update the price for the hard drive with the serial number
12293 to $220.
17. Use the GRANT statement to grant the insert privilege to public on table HARDDRIVE,
and then use the REVOKE statement to remove the insert privilege to public.
18. Insert the following data into the table ORDER created for Question 9:
10
7/9/04
90
1290
11
7/11/04
56
1456
12
7/15/04
78
2078
13
8/1/04
103
1903
14
8/3/04
50
1650
15
8/7/04
90
1896
Search WWH ::




Custom Search