Multiple choice technology programming languages

You run the following SQL statement: SQL> SELECT lname, deptid, sal, bonus FROM emp WHERE sal, bonus IN (SELECT sal, bonus FROM emp WHERE deptid=20); The statement resulted in an error. Which line is causing the error?

  1. sql>

  2. from emp

  3. WHERE sal, bonus IN

  4. WHERE deptid=20);

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The WHERE clause 'WHERE sal, bonus IN' is syntactically incorrect. When using multiple columns with the IN operator in SQL, you must use row value constructor syntax like 'WHERE (sal, bonus) IN (SELECT sal, bonus FROM...)'. The comma-separated form without parentheses is not valid SQL syntax.