Write SQL statements for the following questions :
1. Create product table.
2. Create client table.
3. Insert records to product table.
4. Insert records to client table.
5. Display the details of product table whose price between 56 and 78.
6. Display the pname, manufacturer and price of all products whose pname starts with
‘s’.
7. Display the pname, manufacturer and price of all products whose pname ends with
‘r’.
8. Display the pname, manufacturer and price of all products whose pname do not
contain ‘a’.
9. Display the details whose names contains ‘a’ as the second character in the
product table.
10. Display the details of all the products in ascending order of their pname.
11. Display the records of all the product along with price incremented by rs 100.
12. Display the records of all the product along with price incremented by rs 100 in a
new column ‘Updatedprice’.
13. Display the number of products present in manufacture ‘COP’.
14. Display the sum and average of the prices of all the products.
15. Display the details of all the products whose pname is NULL.
16. Display the names of various manufacturer of the table product. A manufacturer
name should appear only once.
17. Print maximum, minimum price of table product.
18. Display all the details of product table whose manufacturer either ‘COP’ or ‘LAC’.
19. List product details whose manufacturer not in ‘LAC’.
20. Display the details of all the products whose price below than 45.
21. Modify the price to 45 for those products having manufacturer ‘XYZ’.
22. Change the price to 58 and manufacturer to ‘PVC’ for those products having price
more than 70.
23. Update the price of all products by 5% whose manufacturer name is ‘COP’.
24. Delete the record whose pname is ‘SHAMPOO’.
25. Add a column in product table with the name ‘quantity’ type integer.
26. Change the column name CNAME to CLIENTNAME in client table.
27. Display the records of PRODUCT and CLIENT table both. (joining)
28. Display PNAME, PRICE, CNAME and CITY of both the tables for identical PNO in
both the table.
29. Display total price of products belonging to ‘COP’ manufacturer.