Menggunakan ketentuan WHERE.
Sintak :
SELECT employee_id, last_name, job_id, department_id
FROM employees
WHERE department_id = 90 ;
Sintak :
SELECT last_name, job_id, department_id
FROM employees
WHERE last_name = 'Whalen' ;
Menggunakan Kondisi BETWEEN
Sintak :
SELECT last_name, salary
FROM employees
WHERE salary BETWEEN 2500 AND 3500 ;
Menggunakan Kondisi IN
Sintak :
SELECT employee_id, last_name, salary, manager_id
FROM employees
WHERE manager_id IN (100, 101, 201) ;
Sintak :
SELECT first_name FROM employees
WHERE first_name LIKE 'S%' ;
SELECT last_name FROM employees
WHERE last_name LIKE '_o%' ;
Sintak :
SELECT last_name, manager_id
FROM employees
WHERE manager_id IS NULL ;
Sintak :
SELECT employee_id, last_name, job_id, salary
FROM employees
WHERE salary >=10000 AND job_id LIKE '%MAN%' ;
Sintak :
SELECT employee_id, last_name, job_id, salary
FROM employees
WHERE salary >= 10000
OR job_id LIKE '%MAN%' ;
Sintak :
SELECT last_name, job_id
FROM employees
WHERE job_id
NOT IN ('IT_PROG', 'ST_CLERK', 'SA_REP') ;
Sintak :
SELECT last_name, job_id, salary FROM employees
WHERE job_id = 'SA_REP'
OR job_id = 'AD_PRES'
AND salary > 15000;
SELECT last_name, job_id, salary FROM employees
WHERE (job_id = 'SA_REP'
OR job_id = 'AD_PRES')
AND salary > 15000;
Sintak :
SELECT last_name, job_id, department_id, hire_date
FROM employees
ORDER BY hire_date ;