If they wanted the result to be between 30 to 40 years old customers, can't they just use the BETWEEN operator? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

If they wanted the result to be between 30 to 40 years old customers, can't they just use the BETWEEN operator?

The question title itself is pretty self-explanatory.

28th Oct 2017, 10:04 AM
Chayut Liewlom
Chayut Liewlom - avatar
2 Answers
+ 15
Please post the appropriate full query so that we can understand better... https://www.sololearn.com/discuss/333866/?ref=app Edit: Ok so i went through the SQL course and found this.. SELECT ID, FirstName, LastName, Age FROM customers WHERE Age >= 30 AND Age <= 40; Yes you are right we can use BETWEEN also but the lesson title said use of AND. It just shows how we can filter using AND in the query
28th Oct 2017, 10:57 AM
Frost
Frost - avatar
+ 1
i think if use BETWEEN the answer will be the ages between 30,40 only but 30 and 40 will not be included
28th Oct 2017, 3:49 PM
Fatima Hussein Abdalla
Fatima Hussein Abdalla - avatar