AND MO_NUMBER IN (
SELECT MO_NUMBER FROM TABLE1 WHERE 1=1
AND (TO_CHAR(OUT_TIME,'YYYY/MM/DD HH24:MI:SS') BETWEEN '2013/07/18 07:30:00' AND '2013/07/25 10:28:56')
)
如果是下面的这句,速度非常慢。
AND MO_NUMBER IN (
SELECT MO_NUMBER FROM TABLE1 WHERE 1=1
AND OUT_TIME BETWEEN TO_DATE('2013/07/18 07:30:00', 'YYYY/MM/DD HH24:MI:SS') AND TO_DATE('2013/07/25 10:28:56','YYYY/MM/DD HH24:MI:SS')
)