PrepAway - Latest Free Exam Questions & Answers

What will be the result when the following statement is executed?

Given the following SQL statements:
CREATE TABLE tab1 (col1 INTEGER)
INSERT INTO tab1 VALUES (NULL)
INSERT INTO tab1 VALUES (1)
CREATE TABLE tab2 (col2 INTEGER)
INSERT INTO tab2 VALUES (NULL)
INSERT INTO tab2 VALUES (1)
INSERT INTO tab2 VALUES (2)
What will be the result when the following statement is executed?
SELECT * FROM tab1 WHERE col1 IN (SELECT col2 FROM tab2)

PrepAway - Latest Free Exam Questions & Answers

A.
COL1
—-
1
1 record(s) selected.

B.
COL1
—-
NULL
1
2 record(s) selected.

C.
COL1
—-
-1
2 record(s) selected.

D.
COL1
—-

1 record(s) selected.

One Comment on “What will be the result when the following statement is executed?


Leave a Reply