Restricting and Sorting Data
Restricting and Sorting Data
EMPLOYEES
“retrieve all
employees
in department 90”
Operator Meaning
= Equal to
Operator Meaning
SELECT first_name
FROM employees
WHERE first_name LIKE 'S%';
Operator Meaning
OR requires
OR requires either
either condition
condition to
to be
be true.
true.
SELECT employee_id, last_name, job_id, salary
FROM employees
WHERE salary >= 10000
OR job_id LIKE '%MAN%';
Use
Use parentheses
parentheses to
to force
force priority.
priority.
…
• You can sort by a column that is not in the
SELECT list.