Q. Consider the table Product shown below:


Table: PRODUCT


 
P_ID ProductName Manufacturer Price
P001 Moisturizer XYZ 40
P002 Sanitizer LAC 35
P003 Bath Soap COP 25
P004 Shampoo TAP 95
P005 Lens Solution COP 350


Write the commands in SQL queries for the following:


(a) To display the details of product whose price is in the range of 40 and 120 (both values included).

(b) To increase the price of all the products by 20.


Answer :-

(a) Select * from PRODUCT where Price between 40 and 120 ;
(b) update PRODUCT set price =  20 + price ;

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post