范围查找 between and...

112 阅读1分钟

格式

select * from 表名 where 列名 between 最小值 and 最大值

等价于

select * from 表名 where 列名 >= 最小值 and 列名 <= 最大值

例子

攻击力在66到79之间

select * from sanguo where attack between 66 and 79

换一种方式搜

找出攻击力大于66 并且 攻击力。。。。

说明

最小值与最大值,在包含的范围内