BETWEEN

I would like to select all rows that have Id between 50 and 60, but I would not like to select the number 50 and the number 60. By using BETWEEN one selects both. How is best to do this?
johnkainnAsked:
Who is Participating?
 
zvytasCommented:
SELECT *
FROM Table
WHERE ID > 50 AND ID < 60

OR

SELECT *
FROM Table
WHERE ID BETWEEN 51 AND 59
0
 
HainKurtSr. System AnalystCommented:
:) maybe this:


SELECT *
FROM Table
WHERE ID BETWEEN 50 AND 60 and id != 50 and id != 60
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.