Computer Science, asked by rakhig2147, 1 year ago

Write the sql command to save the rows inserted

Answers

Answered by Rehan2002
0
INSERT INTO RENTAL VALUES (1008, '03-MAR-11', 105);

INSERT INTO RENTAL VALUES (1009, '03-MAR-11', 111);

DETAILRENTAL:

INSERT INTO DETAILRENTAL VALUES (1001, 34342, 2, '04-MAR-11', '02-MAR-09', 1);

INSERT INTO DETAILRENTAL VALUES (1001, 34366, 3.5, '04-MAR-11', '02-MAR-09', 3);

INSERT INTO DETAILRENTAL VALUES (1001, 61353, 2, '04-MAR-11', '03-MAR-09', 1);

INSERT INTO DETAILRENTAL VALUES (1002, 59237, 3.5, '04-MAR-11', '04-MAR-09', 3);

INSERT INTO DETAILRENTAL VALUES (1003, 54325, 3.5, '04-MAR-11', '09-MAR-09', 3);

INSERT INTO DETAILRENTAL VALUES (1003, 61369, 2, '06-MAR-11', '09-MAR-09', 1);

INSERT INTO DETAILRENTAL VALUES (1003, 61388, 0, '06-MAR-11', '09-MAR-09', 1);

INSERT INTO DETAILRENTAL VALUES (1004, 34341, 2, '07-MAR-11', '07-MAR-09', 1);

INSERT INTO DETAILRENTAL VALUES (1004, 34367, 3.5, '05-MAR-11', '07-MAR-09', 3);

INSERT INTO DETAILRENTAL VALUES (1004, 44392, 3.5, '05-MAR-11', '07-MAR-09', 3);

INSERT INTO DETAILRENTAL VALUES (1005, 34342, 2, '07-MAR-11', '05-MAR-09', 1);

INSERT INTO DETAILRENTAL VALUES (1005, 44397, 3.5, '05-MAR-11', '05-MAR-09', 3);

INSERT INTO DETAILRENTAL VALUES (1006, 34366, 3.5, '05-MAR-11', '04-MAR-09', 3);

INSERT INTO DETAILRENTAL VALUES (1006, 61367, 2, '07-MAR-11', NULL, 1);

INSERT INTO DETAILRENTAL VALUES (1007, 34368, 3.5, '05-MAR-11', NULL, 3);

INSERT INTO DETAILRENTAL VALUES (1008, 34369, 3.5, '05-MAR-11', '05-MAR-09', 3);

INSERT INTO DETAILRENTAL VALUES (1009, 54324, 3.5, '05-MAR-11', NULL, 3);

67. Write the SQL command to save the rows inserted in Problem 66.

COMMIT;

68. Write the SQL command to change the movie year for movie number 1245 to 2008.

UPDATE MOVIE

SET

MOVIE_YEAR = 2008

WHERE

MOVIE_NUM = 1245;

69. Write the SQL command to change the price code for all Action movies to price code 3.

UPDATE MOVIE

SET

PRICE_CODE = 3

WHERE

MOVIE_GENRE = 'ACTION';

70. Write a single SQL command to increase all price rental fee values by $0.50.

UPDATE PRICE

SET

PRICE_RENTFEE = PRICE_RENTFEE + .5;

71. Write the SQL command to save the changes made to the PRICE and MOVIE tables in

Problems 67 – 70.

COMMIT;

280.
Similar questions