Question: Debugging Question, correcting the below code CREATE TABLE tab1 (col1 CHAR(3), col2 CHAR(20))); COMMIT; INSERT INTO tab1 VALUES (123, 'Red'); INSERT INTO tab1 VALUES (456,

Debugging Question, correcting the below code

CREATE TABLE tab1 (col1 CHAR(3), col2 CHAR(20))); COMMIT; INSERT INTO tab1 VALUES (123, 'Red'); INSERT INTO tab1 VALUES (456, 'Yellow'); SAVEPOINT s1 ON ROLLBACK RETAIN CURSORS; DELETE FROM tab1 WHERE col1 = 132; INSERT INTO tab1 VALUES (879, 'Blue'); ROLLBACK TO SAVEPOINT s1; INSERT INTO tab1 VALUES (789, 'Green'); UPDATE tab1 SET col2 = PURPLE WHERE col1 = 789; COMMIT;

OUTPUT:

COL1 COL2

123 Red 456 Yellow 789 - 3 record(s) selected

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!