No products in the cart.

Consider the following table name “Garment” …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Consider the following table name “Garment” write SQL command of given below. 1*4=4 Gcode Gname Size Color Price 111 Tshirt XL Red 1400.00 112 Jeans L Blue 1600.00 113 Skirt M Black 1100.00 114 Trousers XL Blue 4000.00 115 Ladies Top L Brown 1200.00  To display name of those garment that are available in ‘XL’ size.  To display codes and names of those garment that have their name starting with ‘Ladies’  To display garment name,codes and price of those garment that have price is in the range 1000.00 – 1500.00  To change the color of garment with Gcode as 113 to orange.
  • 2 answers

Mayank Raj 1 year, 9 months ago

madher India mc

Gaurav Seth 3 years, 11 months ago

 Consider the following table named “GARMENT”. Write command of SQL for (i) to (iv) and output for (v) to (vii).

Table: GARMENT

GCODE

GNAME

SIZE

COLOUR

PRICE

111
112
113
114
115
116

T-shirt
Jeans
Skirt
Ladies Jacket
Trousers
Ladies top

XL
L
M
XL
L
L

Red
Blue
Black
Blue
Brown
Pink

1400.00
1600.00
1100.00
4000.00
1500.00
1200.00

(i)  To display names of those garments that are available in ‘XL’ size. (1)

(ii) To display codes and names of those garments that have their names starting with ’Ladies’. (1)

(iii) To display garment names, codes and prices of those garments that have price in the range 1000.00 to 1500.00 (both 1000.00 and 1500.00 included). (1)
(iv) To change the color of garments with code as 116 to “Orange”. (1)

(v) SELECT COUNT (DISTINCT (SIZE)) FROM GARMENT; (1)

(vi) SELECT AVG (PRICE) FROM GARMENT; (1)

(vii) SELECT NAME FROM GARMENT (1)
(c) What is the degree and cardinally of ‘Garment’ table? (1)
6. (a) Write MySql command to create the table DEPARTMENT with given constraints (2)
TABLE: DEPARTMENT

COLUM_NAME DATATYPE(SIZE) CONSTRAINT
Department ID
DepName
Manager ID
Location
Int(4)
varchar(50)
char (40)
varchar (30)
Primary Key
Not Null

(b) In a Database, there are two tables given below:

Table: EMPLOYEE

EMPLOYEEID NAME SALES OBID
E1 SAMIT SINHA 1100000 102
E2        IJAY SINGH TOMAR 1300000 101
E3 JAY RAJPAL 1400000 103
E4 OHIT RAMNANI 1250000 102
E5 SHAILJA SINGH 1450000            103

Table: JOB

JOBID JOB TITLE SALARY
101
102
103
104
105
106
President
Vice President
Administration Assistant
Accounting Manager
Accountant
Sales Manager
200000
125000
80000
70000
65000
80000
http://mycbseguide.com/examin8/

Related Questions

What are called tokens
  • 2 answers
What is mean by buffering in file handling?
  • 1 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App