PrepAway - Latest Free Exam Questions & Answers

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

PrepAway - Latest Free Exam Questions & Answers

A.
COL1 COL2
—- ——-
123 Red
456 Yellow
2 record(s) selected.

B.
COL1 COL2
—- ——
456 Yellow
1 record(s) selected.

C.
COL1 COL2
—- —–
123 Red
456 Yellow
789 –
3 record(s) selected.

D.
COL1 COL2
—- ——
123 Red
456 Yellow
789 Green
3 record(s) selected.

One Comment on “Which of the following records would be returned by the following statement?


Leave a Reply