Q. Consider a database name "db_name" whose attributes are intern_id (primary key), subject.
Intern_id= {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 MySQL statement?
SELECT intern_id
FROM db_name
WHERE subject NOT IN (c, c++);
β
Correct Answer: (D)
None of the mentioned
Explanation: This question is about understanding how to use the NOT IN clause in MySQL and how it works with a one-to-one relationship. Let's break it down step by step: