SQL比较时间查询语句
2017-07-10 14:19
211 查看
select * from table1 where datediff(mm,'2009-8-12 13:17:50', date)>0
select * 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比较时间查询语句
- ASP比较时间的SQL语句ACCESS查询中怎么写日期比较的SQL语句
- SQL查询语句:关于时间的比较
- sql 时间比较 查询语句
- sql语句中日期时间格式化查询
- sql语句中日期时间格式化查询
- JDBC获取SQL查询语句返回记录数的三种方式效率比较
- JDBC获取SQL查询语句返回记录数的三种方式效率比较
- sql 查询时间的一些常用语句
- sql语句的优化分析之一查询语句中左连接和函数效率分析比较
- 【转】sql语句中日期时间格式化查询
- 比较常用的sql 查询语句
- sql语句中日期时间格式化查询
- 查询某段时间内过生日的员工名单的SQL语句
- 按时间查询的SQL语句
- Sql server中时间查询的一个比较快的语句
- SQL Server查询SQL语句的执行时间
- 查询某段时间内过生日的员工名单的SQL语句
- access与SqlServer 之时间与日期及其它SQL语句比较
- sql查询语句中 in和 exists的区别与性能比较