SQL allows duplicate tuples in relations, and correspondingly defines the…

GATE · 2014 · CS · Set 2 · Computer Science & ITTPSC Computer/IT Posts · 2025 · Senior Informatics Officer · Section D

SQL allows duplicate tuples in relations, and correspondingly defines the multiplicity of tuples in the result of joins. Which one of the following queries always gives the same answer as the nested query shown below:

select * from R where a in (select S.a from S)
  1. A.
    select R.* from R, S where R.a=S.a
  2. B.
    select distinct R.* from R,S where R.a=S.a
  3. C.
    select R.* from R,(select distinct a from S) as S1 where R.a=S1.a
  4. D.
    select R.* from R,S where R.a=S.a and is unique R

Attempted by 212 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…