精灵兽师 薇茵妲:sql 查询两个值之间的语法
来源:百度文库 编辑:高校问答 时间:2024/05/21 22:05:57
例如:要查询出 age小于50 大于18 之间的所有值
select * from tablename where age>18 and age<50;
或者
select * from tablename where age between 18 and 50;
select * from tablename where age>18 and age<50;
或者
select * from tablename where age between 18 and 50;