Q. The following MySQL statement belongs to which condition types?
SELECT fname
FROM person
WHERE dept_id= (SELECT dept_id FROM department WHERE names=’s’);
SELECT fname
FROM person
WHERE dept_id= (SELECT dept_id FROM department WHERE names=’s’);
β
Correct Answer: (A)
Equality condition
Explanation: This MySQL statement uses a subquery to find the department ID of a department named 's' and then selects all the first names (fname) from the person table where the department ID matches the result of the subquery.