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

Select operation in SQL is equivalent to
#79 MCQ
Consider the following relations: Consider the following SQL query. SELECT S.Student_Name, sum(P.Marks) FROM Student S, Performance P WHERE S.Roll_No = P...
#1149 NAT
Given the following schema: employees(emp-id, first-name, last-name, hire-date, dept-id, salary) departments(dept-id, dept-name, manager-id, location-id) You...
#1225 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......