ajpenalosa
6/15/2018 - 6:23 PM

Query Between

BETWEEN is inclusive, and will include items with both id 10 and 15.

SELECT * FROM table_name
WHERE column_name BETWEEN 10 AND 20;

SELECT job FROM mytable WHERE id BETWEEN 10 AND 15;

-- Note that BETWEEN is inclusive, and will include items with both id 10 and 15.

-- If you do not want inclusion, you'll have to fall back to using the > and < operators.

SELECT job FROM mytable WHERE id > 10 AND id < 15;