. To insert the following record
(“F005”, “Kurta”, “Woollen”,5)
b. To display only those fabric whose disc is more than 10
c. To display those records whose type is “Woollen”
d. To modify the fabric shirt by increasing discount by 10
e. To delete the record of fabric ‘F003’ from table
Answers
A. SQL Command To insert the following record
(“F005”, “Kurta”, “Woollen”,5)
Ans- INSERT INTO Fabric (FabricID, Fname, Type, Disc) VALUES (“F005”, “Kurta”, “Woollen”,5)
b. To display only those fabric whose disc is more than 10
ANS- select * from Fabric where Disc<10.
c. To display those records whose type is “Woollen”
Ans- select * from Fabric where Type=woollen.
d. To modify the fabric shirt by increasing discount by 10
Ans- UPDATE Fabric
SET disc = '20'
WHERE type = shirt;
e. To delete the record of fabric ‘F003’ from table
DELETE FROM Fabric WHERE FabricID='F003';
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: