这两个SQL语句哪个执行效率更高?请说明原因,其中testDATE为日期型字段,并且是索引。strDate是String变量。
select * from test a where a.testDATE < to_date('" + strDate + "', 'yyyy/mm/dd hh24:mi:ss')
select * from test a where to_char(a.testDATE,'yyyy/mm/dd hh24:mi:ss') < '" + strDate +"'"
select * from test a where a.testDATE < to_date('" + strDate + "', 'yyyy/mm/dd hh24:mi:ss')
select * from test a where to_char(a.testDATE,'yyyy/mm/dd hh24:mi:ss') < '" + strDate +"'"
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货