sql语句中如何查询一个字段的值为偶数的记录呢?
select * from table where 字段a
该怎么写呢?
[解决办法]
- SQL code
select * from table where 字段a mod 2 = 0
[解决办法]
oracel:
select * from sys_tabs a where mod(a.id,2)=0 --偶数
发布时间: 2012-02-29 16:44:11 作者: rapoo
sql语句中如何查询一个字段的值为偶数的记录呢?
select * from table where 字段a
该怎么写呢?
[解决办法]
select * from table where 字段a mod 2 = 0
[解决办法]
oracel:
select * from sys_tabs a where mod(a.id,2)=0 --偶数