读书人

这个SQL语句该怎样修改?解决方法

发布时间: 2012-02-05 12:07:14 作者: rapoo

这个SQL语句该怎样修改?
select * from table where a between 1 and 156


但现在只想查找为双数的记录?

select * from table where a in(2,4,6,8,10...........)
这样太长了..




[解决办法]
select * from table where a%2=0 and a <=156
[解决办法]
select * from table where a between 1 and 156
and a%2=0
[解决办法]
同意wym840713()这位兄弟的select * from table where a between 1 and 156 and a%2=0,另一位兄弟的select * from table where a%2=0 and a <=156可以取到0,这点不符合你的要求

读书人网 >SQL Server

热点推荐