10000条数据,循环操作
select Id,Name,RateDate from Info where ANumber='" + ANumber + "' and DATEDIFF (s,RateDate,'" + TestDate + "')>0
DATEDIFF 相当耗时,如何解决
------解决方案--------------------
不用 DATEDIFF,直接就拿日期来比就得了。
select Id,Name,RateDate from Info where ANumber='" + ANumber + "' and DATEDIFF (s,RateDate,'" + TestDate + "')>0