Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
12.4k views
in Computer by (79.0k points)

In a database there are two tables :

                 Table : ITEM

ICode Name Price
101 Television 75000
201 Computer 42000
303 Refrigerator 90000
404 Washing Machine 27000

               Table : BRAND

ICode Brand
101 Sony
202 HP
303 LG
404 IFB

Write MySQL queries for the following:

(i) To display ICode, IName and corresponding Brand of those items whose price is between 20000 and 45000 (both values inclusive).

(ii) To display Icode, price and Brand of Televisions.

(iii) To increase the price of all items by 15%.

1 Answer

+1 vote
by (76.3k points)
edited by
 
Best answer

(i) Select Item.Icode, IName, Brand from Item, Brand Where Item.ICode = Brand.Icode and Item.price between 20000 and 45000.

(ii) Select Item.Icode, price, Brand from Item,Brand where Item.ICode = Brand.Icode and Iten.Iname like 'Television'.

(iii) Update item set Price = Price + (Price* 0.15);

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

...