Consider the following three queries on relation S(A, B) and R(B, C) Q1:…
Consider the following three queries on relation S(A, B) and R(B, C)
Q1: SELECT S. A FROM S WHERE S.B NOT IN (SELECT R.B FROM R WHERE R. B > 5);
Q2: SELECT S. A FROM S WHERE S.B <> ALL (SELECT R.B FROM R WHERE R. B > 5);
Q3: SELECT S.A FROM S WHERE NOT EXISTS (SELECT R.B FROM R WHERE R.B > 5 AND R.B = S.B) ;
- A.
The first query is not equivalent to any of the other queries
- B.
The first query is equivalent to the second query only
- C.
The first query is equivalent to the third query only
- D.
All three queries are equivalent
Attempted by 395 students.
Sign up free to check your answer
Sign up freeLoading lesson…

