34,590
社区成员
发帖
与我相关
我的任务
分享
select 1 from sysfiles where '2009-06-01' = '2009-6-1' 显然不正确,因为是字符串比较
select 1 from sysfiles where '2009-06-01' = '2009-06-01' 正确!!
select 1 from sysfiles where '2009-06-01' = '2009-6-1'
select 1 from sysfiles where cast('2009-06-01' as smalldatetime) = cast('2009-6-1' as smalldatetime
)