Page 329 - IT 402 v2.0 class 10
P. 329
1. ow many fields and records are there in Sales table
2. Write SQL commands for the following:
i. Display Sales ID and price of all products whose discount is more than 1000.
ii. Display the details alphabetically by product name.
iii. Display product name and sales price after deducting the discount from the price.
Note: Sales price can be calculated as price-discount
lication ased uestions: L if e S k il l s & V al ue s
1. Write the queries for the following table : Emp
m id name Salar
1 Suman 20000
2 Sanjay 32000
3 Ravi 30000
Write SQL commands to:
i. Display the salary of all the employees after incrementing by Rs 1000.
ii. Display the Employee id and salary of all the employees after decreasing by Rs 500.
iii. Display the Name and salary of all the employees after incrementing it as thrice the amount of present salary.
iv. Display the Employee id, Name and salary of all the employees after decrementing it as half the amount of
present salary.
v. Display the Employee id and Name of all the employees.
2. Write the queries for the following table : Item
Item no Iname Price Qty
12 Pen 10 17
13 Eraser 5 15
14 Notebook 15 20
i. Write a query to insert a new record of following details
15, “Pencil”, 20, 10
ii. Write a query to display detail of items whose quantity is more than 10.
iii. Write a query to change the quantity of Item number 13 to 25.
iv. Write a query to display the total amount of each item. The amount must be calculated as the price multiplied
by quantity for each item.
v. Write a query to display the name of item whose price is 10.
vi. Write a query to display all the records in ascending order of price.
vii. Identify the Primary key from table Item.
Previous Years’ Questions
1. ............................. clause can be used with the SELECT statement in SQL to specify which rows to retrieve from the
table. [2023]
a b O
c S M d SIMI
ns. a
More on Database 327

