Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
289 views
in Structured Query Language (SQL) by (54.8k points)
closed by

Differentiate between and not between?

1 Answer

+1 vote
by (49.1k points)
selected by
 
Best answer

BETWEEN and NOT BETWEEN Keywords

The BETWEEN keyword defies a range of values the record must fall into to make the condition true. The range may include an upper value and a lower value between which the criteria must fall into. 

SELECT Admno, Name, Age, Gender FROM Student WHERE Age BETWEEN 18 AND 19;

Admno Name Gender Age Place
101 Adarsh M 18 Delhi
103 Ayush M 18 Delhi
104 Abinandh M 18 Chennai
105 Revathi F 19 Chennai
106 Devika F 19 Bangalore

The NOT BETWEEN is reverse of the BETWEEN operator where the records not satisfying the condition are displayed.

SELECT Admno, Name, Age FROM Student WHERE Age NOT BETWEEN 18 AND 19;

Admno Name Age
101 Ashish 17
102 Akshith 17
107 Hema 17

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

...