Consider the following table name “Garment” …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Posted by Gajendra Singh 2 years, 10 months ago
- 2 answers
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 |
T-shirt |
XL |
Red |
1400.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 |
Related Questions
Posted by Kandeepan Jothivel 6 months, 3 weeks ago
- 2 answers
Posted by Manoj Kumar Manoj Kumar 7 months, 1 week ago
- 0 answers
Posted by Syedali Fathima 5 months, 3 weeks ago
- 1 answers
Posted by Hanni Pham 4 months, 1 week ago
- 0 answers
Posted by Hanni Pham 4 months, 1 week ago
- 1 answers
Posted by Priya Shukla 5 months, 2 weeks ago
- 1 answers
Posted by Prawar Narang 6 months, 2 weeks ago
- 1 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app
Mayank Raj 1 year, 9 months ago
2Thank You