Purpose: The BETWEEN
clause filters records within a specified range, inclusive of the boundary values.Syntax:
WHERE column_name BETWEEN value1 AND value2;
Example:
SELECT * FROM employees WHERE salary BETWEEN 50000 AND 70000;
Explanation: This retrieves employees whose salaries are between 50,000 and 70,000, including those exact values.
Leave a Reply