SQL between 不包含
发布网友
发布时间:2022-04-13 10:47
我来回答
共3个回答
热心网友
时间:2022-04-13 12:16
between and 是闭的,只能这样
select * from [成绩表] where [分数] 〉 0 and [分数] <60
或者
select * from [成绩表] where [分数] between 0 and 60
except
select * from [成绩表] where [分数] = 0 or [分数] = 60
热心网友
时间:2022-04-13 13:34
有办法,只能这样写:
select * from [成绩表] where [分数] between 0 and 60 and [分数] not in (0,60)
这样是不是有点画蛇添足了吧,还不如大于小于的方法吧
热心网友
时间:2022-04-13 15:09
select * from [成绩表] where [分数]>0 and [分数]< 60追问我的意思是 有没有 用 between 就直接不含的写法??
这个语句我懂
追答呵呵。用between实现不了您的需求。between and 的语法含义就是这样。