BETWEEN and NOT BETWEEN Operators in SQL
In this class, we will understand BETWEEN and NOT BETWEEN Operators in SQL.
We have already discussed the concepts of IN and NOT IN operators in SQL.
BETWEEN and NOT BETWEEN Operators in SQL
BETWEEN Operator in SQL
With Between operator, we can test a list of values.
To understand this, we will consider the table given below.
From the above table, we will try to fetch the details of the students whose salaries are between 200 and 400.
When we use between the values 200 and 400 are also included.
The query is as shown below.
SELECT * FROM students WHERE salary BETWEEN 200 and 400;
The output for the query is as shown below.
NOT BETWEEN Operator in SQL
From the above table, we will try to fetch the details of the students whose salaries are not between 200 and 400.
The query is as shown below.
SELECT * FROM students WHERE salary NOT BETWEEN 200 and 400;
The output for the query is as shown below.
#learningmonkey #dbms #placements #gatecse #gatedbms #campusplacements
Link for playlists:
/ @learningmonkey
Link for our website: https://learningmonkey.in
Follow us on Facebook @ / learningmonkey
Follow us on Instagram @ / learningmonkey1
Follow us on Twitter @ / _learningmonkey
Mail us @ [email protected]
En esta página del sitio puede ver el video en línea BETWEEN and NOT BETWEEN Operators in SQL || Lesson 53 || DBMS || Learning Monkey || de Duración hora minuto segunda en buena calidad , que subió el usuario Learning Monkey 29 octubre 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,040 veces y le gustó 17 a los espectadores. Disfruta viendo!