...

Database Managment - MySql

Back to Course

Lesson Description


Lession - #1318 SQL Between


The BETWEEN operator chooses values inside a given range. The values can be numbers, text, or dates. The BETWEEN operator is inclusive: start and end values are included.

Syntax



SELECT column_name(s>
FROM table_name WHERE column_name BETWEEN value1 AND value2;


Let's see an example



SELECT * FROM EMPLOYEE
WHERE salary BETWEEN 5000 AND 6000;

Output


Try it here