Question 14210 – Database-Management-System
December 7, 2023Question 17109 – NTA UGC NET JUNE-2023 Paper-2
December 7, 2023Question 8670 – Database-Management-System
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)
Correct Answer: C
Question 48 Explanation:
Multiplicity of duplicate tuples will be distributed when there is a match between R.a and S.a; and for that match, S.a’s value is repeated in each cases except the third case. So, the output of query given in the question matches with the output of (C).
select R.* from R,S where R.a=S.a
select distinct R.* from R,S where R.a=S.a
select R.* from R,(select distinct a from S) as S1 where R.a=S1.a
select R.* from R,S where R.a=S.a and is unique R
Subscribe
Login
0 Comments