The document outlines a series of database operations including creating a table for items, inserting data, and displaying various information such as item details, price calculations, and supplier data. It also includes instructions for modifying the table structure, performing calculations, and filtering data based on specific criteria. Additionally, it covers creating a new table for suppliers and performing aggregate functions on the data.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
8 views
SQL Practicals
The document outlines a series of database operations including creating a table for items, inserting data, and displaying various information such as item details, price calculations, and supplier data. It also includes instructions for modifying the table structure, performing calculations, and filtering data based on specific criteria. Additionally, it covers creating a new table for suppliers and performing aggregate functions on the data.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
1. Create the following table items.
Column name Data type Size Constrain
Itemno Number 3 Primary key
Iname Varchar 15
Price Number 10,2
Quantity Number 3
2. Insert the following information:
Table: Item
Itemno Iname Price Quantity
101 Soap 50 100
102 Powder 100 50
103 Face cream 150 25
104 Pen 50 200
105 Soap box 20 100
3. Display all items information.
4. Display item name and price value. 5. Display soap information. 6. Display the item information whose name starts with letter 's'. 7. Display a report with item number, item name and total price. (total price = price * quantity). 8. Display item table information in ascending order based upon item name. 9. Display item name and price in descending order based upon price. 10. Display item name, whose price is in between 50 to 100. 11. Add new column totalprice with number (10, 2). 12. Increase price value by 100. 13. Fill up totalprice = price * quantity. 14. Remove powder information. 15. Remove totalprice column. 16. Create table item1 from item – first 3 columns 17. Display the content 18. Remove items1 19. Create table supplier (scode,sname,city,dos,itemno) 20. Insert values 21. Display content based on dates – relational operator, pattern matching 22. Display itemno, name, sname and city 23. Average of price 24. Sum of quantity for each supplier 25. Cartesian product of item and supplier 26. Distinct city 27. Count of supplier for each city with count >1 28. Count of distinct city 29. Display maximum quantity and the corresponding item name 30. Display the details of items from two particular suppliers based on list