好用的手机公司, 新年大促销: 3 month FREE! $15/Month 5GB data and text

Author Topic: Difference between Where ID in (200, 500) and Where ID between 200 AND 500  (Read 1938 times)

Melanie.Lee

  • Core Package
  • Full Member
  • *
  • Posts: 102
  • Karma: +0/-0
Hi all tutors and classmates,
To me, the two Where conditions are same in SQL queries. But I know there must be some differences. 
Appreciate your help in advance.


The original question is copied as below:
If you want to select all rows from the STUDENT table where student ID is any number between 100 and 500,  which of the below Where conditions would you use?
a. Where ID in (100,500}
b. Where ID Between 100 AND 500