在SQL语句中加入时间比较作为查询条件

select * from 表名 where 列名 = ? and DATEDIFF(hh,时间列,'2016-08-22 15:05:59.000')<9

原文地址:https://www.cnblogs.com/SuperLady/p/5830069.html