4. Selecting ROWS to display: Step 8

Demo

Complex expressions

We can use any of the comparison operators to create a complex expression, and join expressions with AND or OR, and negate an expression with NOT.

Here we list just the names of Clerks in Department 20:

SQL

SELECT ename FROM emp WHERE job = 'CLERK' AND deptno = 20;

Output

ename
SMITH
ADAMS

Progress

Proceed to Next step