如何一次性查询到所需要的记录
一个表中,我需要从id字段查询出id=1,3,5,7,9所有单数的记录,应该怎么写
[解决办法]
select * from tbl where id in(1,3,5,7,9)
[解决办法]
[解决办法]
- SQL code
select * from TB where id in (1,3,5,7,9)
[解决办法]
select * from T where id mod 2 = 0
[解决办法]
select * from T where id mod 2 = 1
[解决办法]