SQL时间区间条件查询三种方法比较 ① 大于、小于 select * from userleveldetaillog u where u.operatedate > '2010-03-01' and u. operatedate < '2010-04-01'; 注意:此种方法目前似乎算是最快;第一 ② between......and... select * from userleveldetaillog u where u. operatedate between '2010-03-01' and '2010-04-01'; 注意:效率第二 ③ 用datediff函数先求出两个时间差再做正负判断 select * from userleveldetaillog u where datediff(u.operatedate, '2010-03-01') > 0 and datediff(u.operatedate, '2010-04-01') < 0; 注意:效率第三。暂时不怎么用此法 本文来源:https://www.wddqw.com/doc/5a15b6282af90242a895e524.html