USA LaoTu 高薪转行做数据第一平台

只要你有颗求变的心并愿意行动,到这里来,必使你得改变!成千聪明华人循此捷径高薪进入大公司! => 同学留言 => Topic started by: Melanie.Lee on June 03, 2019, 10:49:44 AM

Title: Difference between Where ID in (200, 500) and Where ID between 200 AND 500
Post by: Melanie.Lee on June 03, 2019, 10:49:44 AM
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