1.

Consider a database name interviewmania whose attributes are internid (primary key), subject, subjectvalue.
Internid = {1, 2, 3, 4, 5, 6}
Subject = {sql, oop, sql, oop, c, c++}
Subjectvalue = {0, 0, 1, 1, 2, 2, 3, 3}
If these are one to one relation then what will be the output of the following query?
SELECT internid
FROM interviewmania
WHERE subject IN (SELECT subject FROM interviewmania WHERE subjectvalue IN (3, 2));

A. {1, 2, 3, 4, 5, 6}
B. {3, 4}
C. {1, 2, 3}
D. {5, 6}
E. None of these
Answer» B. {3, 4}


Discussion

No Comment Found

Related MCQs