Combining Conditions:
- Logical operators like
AND
,OR
, andNOT
help combine multiple conditions in theWHERE
clause.
Example:
SELECT * FROM employees
WHERE salary > 50000 AND department_id = 10;
Explanation: This retrieves all columns for employees with a salary greater than 50,000 and who are in department 10. Both conditions must be true for a record to be included in the results.
Leave a Reply