Home » MYSQL » Mysql miscellaneous » Question
  1. Consider a database name “interviewmania” whose attributes are intern_id (primary key), subject.
    Internid = {1, 2, 3, 4, 5, 6}
    Subject = {sql, oop, sql, oop, c, c++}
    If these are one to one relation then what will be the output of the following query?
    SELECT internid
    FROM interviewmania
    WHERE subject IN (c, c++, oop);
    1. {2, 4, 5, 6}
    2. {3, 4}
    3. {1, 2, 3}
    4. {5, 6}
    5. None of these
Correct Option: A

Only those value whose subjects are {c, c++, oop} therefore answer is {2, 4, 5, 6}.



Your comments will be displayed only after manual approval.