在Oracle查詢中,可以使用WHERE子句來添加條件過濾
SELECT * FROM employees WHERE salary = 5000;
SELECT * FROM employees WHERE salary <> 5000;
SELECT * FROM employees WHERE salary < 5000;
SELECT * FROM employees WHERE salary > 5000;
SELECT * FROM employees WHERE salary <= 5000;
SELECT * FROM employees WHERE salary >= 5000;
SELECT * FROM employees WHERE last_name LIKE '%Smith';
SELECT * FROM employees WHERE department_id IN (10, 20, 30);
SELECT * FROM employees WHERE salary BETWEEN 4000 AND 6000;
SELECT * FROM employees WHERE salary > 5000 AND department_id = 10;
SELECT * FROM employees WHERE salary > 5000 OR department_id = 10;
SELECT * FROM employees WHERE salary <= 5000;
這些示例展示了如何在Oracle查詢中使用條件過濾。你可以根據需要組合這些條件以滿足特定的查詢需求。