搜 索
您现在的位置: 凯世软件学院 >> 技术开发 >> SQL 学院 >> 文章正文
  最新热门
  业界新闻
  业界新闻
 
 

谈谈sql查询的between

作者:佚名    文章来源:网络    点击数:    更新时间:2006-8-18

作者:啊亮
  发表于ASP地带,2000-11-25 21:42
例子1:求年龄在20与22岁之间(包括20 和 22)的学生的学号和年龄
select number,age
from s
where age between 20 and 22
例子2:求年龄不在20与22岁之间的学生的学号和年龄
select number,age
from s
where age not between 20 and 22
注意:between后面是低值,and 后面是高值!