Home > php教程 > php手册 > 谈谈sql查询的between

谈谈sql查询的between

WBOY
Release: 2016-06-13 10:04:46
Original
1099 people have browsed it

作者:啊亮
发表于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 后面是高值!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template