Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
12.7k views
in Computer by (79.4k points)

In a database there are two tables "ITEM" and "CUSTOMER" as shown below :

                  Table: ITEM

ID Item Name Company Price
1001 Moisturiser XYZ 40
1002 Sanitizer LAC 35
1003 Bath Soap COP 25
1004 Shampoo TAP 95
1005 Lens Solution COP 350

                        Table: CUSTOMER

C_ID Customer Name city ID
01 Samriddh Ltd New Delhi 1002
05 Big Line Inc Mumbai 1005
12 97.8 New Delhi 1001
15 Tom N Jerry Bangalore 1003

Write the command in SQL for the following :

(i) To display the details of the items whose Price is in the range of 40 and 95 (Both values included).

(ii) To display the CustomerName, City from table Customer and ItemName and Price from table Item with their corresponding matching ID'

(iii) To increase the price of all the products by 50.

1 Answer

+1 vote
by (76.5k points)
selected by
 
Best answer

(i) SELECT * FROM ITEM WHERE PRICE > = 40 AND PRICE <=95.

(ii) SELECT CUSTOMERNAME, CITY,ITEMNAME, PRICE FROM CUSTOMER, ITEM WHERE CUSTOMER.ID = ITEM.ID.

(iii) UPDATE ITEM SET PRICE = PRICE + 50.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...