当前位置:Gxlcms > 数据库问题 > SQL比较时间查询语句

SQL比较时间查询语句

时间:2021-07-01 10:21:17 帮助过:21人阅读

* from table1 where datediff(ms,2009-8-12 13:17:50, date)>0

 

select * from table1 where cast(date as datetime)>2009-8-12 13:17:50

 

select * from table1 where CONVERT(DATETIME,date)>2009-8-12 13:17:50 

 

本人测试这条也能通过:

select * from RoomInfo where CreateTime > 2017/7/3 10:46:33;

 

SQL比较时间查询语句

标签:table   sql   datetime   div   oom   highlight   通过   pre   style   

人气教程排行