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) ;

  1. A.

    The first query is not equivalent to any of the other queries

  2. B.

    The first query is equivalent to the second query only

  3. C.

    The first query is equivalent to the third query only

  4. D.

    All three queries are equivalent

Attempted by 395 students.

Sign up free to check your answer

Sign up free

Explore the full course: Isro

Loading lesson…