选取ID在1-5的所有用户
select * from [user] where id between 1 and 5
选取ID不在1-5的所有用户
select * from [user] where id not between 1 and 5
选取ID在1-5的所有用户
select * from [user] where id between 1 and 5
选取ID不在1-5的所有用户
select * from [user] where id not between 1 and 5
转载于:https://www.cnblogs.com/kingfly/archive/2009/12/10/1620926.html