Computer Science, asked by chumkituktukp7knsm, 1 year ago

write the SQL commands to answer the queries based on the fabric table:
FabID Fname. Type. Disc
F01. SHIRT. WOOLEN. 10
F02. SUIT. COTTON. 20
F03. TUNIC. COTTON. 10
F04. JEANS. DENIM. 5

a) to insert the following record ("F005" , "kurta" , " woolen,5)
b) to display only those fabric who disc is more than 10.
c) to display those record whose type is " woolen".
d) to modify the fabric shirt by increasing the discount of 10.
e) delete the record of fabric F003 from table. ( IT vocational )
please write the answer in the correct way......

Answers

Answered by LuckyYadav2578
219
SQL commands :-

a) insert into fabric values ("F005", "Kurta", " woollen" ,5 );

b) select fname from fabric where disc>10;

c) select * from fabric where type ="woollen" ;

d) update fabric set disc= dics+ disc * 10/100 where fname="shirt" ;

e) delete from fabric where fabid=F03 ;

● I hope its help ☆☆ :)

userIsDead: Is your (d) part is correct ??
userIsDead: I think the correct answer is
userIsDead: Update fabric set disc = disc + 10 where Fname = "shirt "
LuckyYadav2578: dear in the question you have to increase 10% of dicsc on disc
LuckyYadav2578: (d) is correct
Answered by userIsDead
76

SQL commands :-

(a) Insert into fabric ("FabricID" , "Fname", "Type","Disc") values ( 'F005' , 'Kurta' , 'Wollen', '5');

(b) Select * from Fabric where disc < 10;

(C) Select * from Fabric where Type = 'Wollen' ;

(d) Update Fabric set disc = disc + 10 where FabricID = F001

(e) Delete from Fabric where FabricID = F003

#Hope it helps ^_^

__________________________

#Follow me ✧✧

__________________________

#Thnk u ...................(^_-)


Mrcool566: no
Similar questions