10 likes | 119 Views
INSERT INTO CarType (mark, model, year) VALUES ('Peugeot', '607', 2005) INSERT INTO Car (reg_no, model_id) VALUES ('CCC-999', 5) UPDATE Car SET rate = 40 WHERE reg_no = 'CCC-999' AND model_id = 5 INSERT INTO Rent (cust_id, reg_no, rent_date) VALUES
E N D
INSERT INTO CarType (mark, model, year) VALUES ('Peugeot', '607', 2005) INSERT INTO Car (reg_no, model_id) VALUES ('CCC-999', 5) UPDATE Car SET rate = 40 WHERE reg_no = 'CCC-999' AND model_id = 5 INSERT INTO Rent (cust_id, reg_no, rent_date) VALUES (2, 'ACC-223', '12.3.2005') UPDATE Car SET rate = 38 WHERE reg_no = 'BAA-442' UPDATE Rent SET return_date = '15.3.2005' WHERE reg_no = 'ACC-223' AND cust_id = 2 SELECT * FROM Rent SELECT * FROM CarType DELETE FROM CarType WHERE model = '607’ DELETE FROM Rent WHERE cust_id = 2 AND reg_no = 'ACC-223' Solutions (Updating)