Home » Database » Database miscellaneous » Question

Database miscellaneous

  1. 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)
    select R.* from R, S where R.a = S.a
    1. select distinct R.* from R, S where R.a = S.a
    2. select R.* from R, (select distinct a from S) as S1
    3. where R.a = S1.a
    4. select R.* from R,S where R.a = S.a and is unique R
Correct Option: C

The one that give same answer is: select R. * from R, (select distinct a from S) as S1 where R.a = S1.



Your comments will be displayed only after manual approval.