Computer Science, asked by sabyasachisahapcwdyk, 1 year ago

write the SQL commands to answer the queries based on 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", " woollen" ,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) to delete the record of fabric F003 from the table.(IT vocational)
please answer this question correctly.......


LuckyYadav2578: dear i m not able to understand what is meant by IT vactional
LuckyYadav2578: vocational*
mayay457: From where do you find this answers.?
LuckyYadav2578: i didnt find it ... i self did it
LuckyYadav2578: i know mySQL
abisoyi2004: Hi
LuckyYadav2578: hlo
kumkumsharma711: Insert into Fabric table
kumkumsharma711: (Fabric ID ,Fname,Type,Disc).
kumkumsharma711: Values (F005,Kurta, Woollen,5);

Answers

Answered by LuckyYadav2578
409
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 ☆☆ :)

abisoyi2004: Thnx lucky
LuckyYadav2578: its my pleasure dear bro :)
kumkumsharma711: First part is not correct
LuckyYadav2578: dear it is correct i have done practical in mysql by checking it
LuckyYadav2578: you can also wtite it like ... insert into fabric ( ' fabid', 'fabname', 'type', 'disc',) values ("F005", "Kurta", " woollen" ,5 )
LuckyYadav2578: Both are correct .... you can check by doing practical
gkarthikmanjunath: Hlo i have a doubt in this ans
gkarthikmanjunath: Its ok. I got the ans
vikashyadav1532004: wt is fname
LuckyYadav2578: fname is fabric name
Answered by abisoyi2004
130

Hi bro your answer is below...

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 ☆☆

Similar questions