Computer Sciences > GATE 2014 SET-2 > SQL
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)
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 a IS UNIQUE R

Correct : c

Similar Questions

Consider the following relational schema:employee (empId, empName, empDept)customer (custId, custName, salesRepId, rating)salesRepId is a foreign key referring...
#1328 MCQ
Consider the following relational schema:employee (empId, empName, empDept)customer (custId, custName, salesRepId, rating)salesRepId is a foreign key referring...
#1328 MCQ
Consider the following relational schema:employee (empId, empName, empDept)customer (custId, custName, salesRepId, rating)salesRepId is a foreign key referring...
#1328 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......