Given two tables A and B, both having a column ID, which SQL statement…
Given two tables A and B, both having a column ID, which SQL statement retrieves all IDs from table A that do not exist in table B?
- A.
SELECT A.ID FROM A WHERE A.ID <> (SELECT B.ID FROM B);
- B.
SELECT A.ID FROM A WHERE A.ID NOT IN (SELECT ID FROM B);
- C.
SELECT A.ID FROM A, B WHERE A.ID != B.ID;
- D.
SELECT A.ID FROM A WHERE A.ID EXISTS (SELECT ID FROM B);
Attempted by 463 students.
Sign up free to check your answer
Sign up freeLoading lesson…

