Gate CS-2014-2 Question Paper With Solutions

Q. 64 SQL allows 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)

(A) select R.* from R, S where R.a = S.a

(B) select distinct R.* from R, S where R.a = S.a

(C) select R. * from R, (select distinct a from S) as S1 where
R.a = S1.a

(D) select R. * from R, S where R.a = S.a and is unique R

Answer: (C)

Explanation:

Gate CS-2014-2 Question Paper With Solutions Gate CS-2014-2 Question Paper With Solutions Gate CS-2014-2 Question Paper With Solutions Gate CS-2014-2 Question Paper With Solutions Gate CS-2014-2 Question Paper With Solutions Gate CS-2014-2 Question Paper With Solutions Gate CS-2014-2 Question Paper With Solutions

Learn More:   Gate ME-2018-2 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here