Which of the following records would be returned by the following statement?

Given the following set of statements:
CREATE TABLE tab1 (col1 INTEGER, 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 = 123;
INSERT INTO tab1 VALUES (789, ‘Blue’);
ROLLBACK TO SAVEPOINT s1;
INSERT INTO tab1 VALUES (789, ‘Green’);
UPDATE tab1 SET col2 = NULL WHERE col1 = 789;
COMMIT;
Which of the following records would be returned by the following statement?
SELECT * FROM tab1
A. COL1 COL2—- ——-123 Red456 Yellow2 record(s) selected.
B. COL1 COL2—- ——456 Yellow1 record(s) selected.
C. COL1 COL2—- —–123 Red456 Yellow789 -3 record(s) selected.
D. COL1 COL2—- ——123 Red456 Yellow789 Green3 record(s) selected.

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.