Site icon T4Tutorials.com

Between operator in sql

The Between operator in SQL can be used to select values within a given range.

Syntax

SELECT column_names
FROM table_name
WHERE column_name BETWEEN first_Value AND second_Value;

Use of NOT Between operator in SQL Query

SELECT * FROM students
WHERE fee NOT BETWEEN 1000 AND 2000;

Use of Between operator in SQL Query

SELECT * FROM students
WHERE fee BETWEEN 1000 AND 2000;

Excercise:

Download the Database of Between operator in SQL and practice it on your XAMPP phpMyAdmin.

Exit mobile version