sql语句解决时间问题
来源:百度知道 编辑:UC知道 时间:2024/07/14 09:50:44
有个表a含有出生时间字段,提取2000年10月1日以后出生的人员,sql语句如何写?谢谢
select * from a where convert(varchar(10), getdate(),20) >'2000-10-01'
必须确保比对的格式相同.
select * from a where 出生时间的栏位名>'2000-10-1'
select 一个人 from 你的表 where datediff(d,'2000-10-1',他的生日) = 0