Computer Science, asked by talhakhan8946, 9 months ago

30. Write the SQL commands to answer the queries based on Fabric table
FabricID
Fname Type
Disc
F001
Shirt
Wollen
F002
Suit
Cotton
10
20
F003
Tunic
Cotton
F004
Jeans
Denim
F006
Shorts
Cotton
(a) To insert the following record
(“F005”, “Kurta”, “Wollen”,5)
(b) To display only those fabric whose disc is more than 10
(c) 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
...
mocion/function​

Answers

Answered by manasa12344
0

Answer:

a) INSERT INTO TABLE NAME ( FabricID, Fname, Type, Disc)

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

b) SELECT * FROM TABLE NAME

  WHERE  Disc > 10;

c) SELECT * FROM TABLE NAME

   WHERE  Type = 'Woolen';

d) UPDATE TABLE NAME

   SET Disc = 20

    WHERE Fname = 'Shirt';

e) DELETE * FROM TABLE NAME

  WHERE FabricID = 'F003';

Explanation:

Similar questions