You are on page 1of 1

Table: GARMENT Table: GARMENT

ItemN ItemDescriptio Fcod Rat MFDDAT ItemN ItemDescriptio Fcod Rat MFDDAT
o n e e E o n e e E
2005 SKRIT 23 8 31-Jun-09 2005 SKRIT 23 8 31-Jun-09
2003 FORMAL PANT 22 25 01-Feb- 2003 FORMAL PANT 22 25 01-Feb-
10 10
2002 JEANS 21 12 24-Feb- 2002 JEANS 21 12 24-Feb-
10 10
2006 INFORMAL 21 20 11-Mar- 2006 INFORMAL 21 20 11-Mar-
SHIRT 09 SHIRT 09
2001 FROCK 22 6 19-Jan-09 2001 FROCK 22 6 19-Jan-09
2004 SLACKS 22 8 02-Dec- 2004 SLACKS 22 8 02-Dec-
09 09
2009 TULIP SKRIT 21 18 03-Nov- 2009 TULIP SKRIT 21 18 03-Nov-
09 09
i) Write SQL code to create table GARMENT i) Write SQL code to create table GARMENT
ii) To display ItemDescription in the GARMENT ii) To display ItemDescription in the GARMENT
table in ascending order of MFDDATE. table in ascending order of MFDDATE.
iii) To display Itemno and Fcode of those items iii) To display Itemno and Fcode of those items
from GARMENT table whose rate is more than from GARMENT table whose rate is more than
15 rupees. 15 rupees.
iv) To display the average price of all the iv) To display the average price of all the
GARMENTs, which are made up of FABRIC with GARMENTs, which are made up of FABRIC with
Fcode 23 Fcode 23
v) To delete tabledefination. v) To delete tabledefination.
vi) To insert a row into TABLE GARMENTS. vi) To insert a row into TABLE GARMENTS.
vii) To alter Fcode variable as varchar2(10) in place vii) To alter Fcode variable as varchar2(10) in place
of numeric of numeric
viii) To display Fcode of each GARMENT along with viii) To display Fcode of each GARMENT along with
highest price . highest price .
ix) To delete contents of GARMENT where Rate is ix) To delete contents of GARMENT where Rate is
greater than18. greater than18.
x) To delete column MFDDATE. x) To delete column MFDDATE.
xi) To display all contents of table GARMENT. xi) To display all contents of table GARMENT.
xii) To display the itemdecription where rate is xii) To display the itemdecription where rate is
greater than 23 in ascending order greater than 23 in ascending order
xiii) To display sum of rate from garment where xiii) To display sum of rate from garment where
fcode must be equal to 21 fcode must be equal to 21
xiv) To display minimum value of focde. xiv) To display minimum value of focde.
xv) To count all unique value of FCODE from Table xv) To count all unique value of FCODE from Table
GARMENT GARMENT
xvi) To delete all contents of Table Garment. xvi) To delete all contents of Table Garment.

You might also like