Computer Science, asked by shagufta1618, 1 year ago

Write the SQL commands to answer the queries based on Fabric tableFabricID Fname Type DiscF001 Shirt Wollen 10F002 Suit Cotton 20F003 Tunic Cotton 10F004 Jeans Denim 5F006 Shorts Cotton 7a) To insert the following record(“F005”, “Kurta”, “Wollen”,5)b) To display only those fabric whose disc is more than 10c) To display those record whose type is “Wollen”d) To modify the fabric shirt by increasing discount of 10 e) To delete the record of fabric F003 from table

Answers

Answered by Fatimakincsem
15

Below are the SQL commands to answer the queries:

A) INSERT INTO Fabric table (FabricID, Fname, Type, Disc)

VALUES ('F005','Kurta', 'Wollen','5');

B) SELECT * FROM Fabric table

WHERE Disc > 10;

C) SELECT FabricID, Fname, Type, Disc

FROM Fabric table

WHERE Type = 'wollen';

D) UPDATE Fabric table

SET Disc = 20 WHERE Type ='shirt';       //increasing discount by 10

E) DELETE Fabric table

WHERE FabricID ='F003';

Similar questions