4. Selecting ROWS to display: Step 11

Demo

List the names of Analysts and Managers in Department 20 and 30.

When there are several possible choices, conditions with OR can get quite complex. You can check if a value is in a list with the IN Operator

SQL

SELECT ename FROM emp WHERE job IN ('ANALYST' ,' MANAGER') AND deptno in (20,30);

Output

ename
SCOTT
FORD

Progress

Proceed to Next step