SELECT *
FROM
MAT_T_INSPECT_TASK
WHERE
1 = 1
AND
TRUNC(INS_TASK_DATE) = TO_DATE('2019-09-30','yyyy-MM-dd')
等同于
SELECT *
FROM
MAT_T_INSPECT_TASK
WHERE
1 = 1
AND INS_TASK_DATE >= TO_DATE('2019-09-30 00:00:00','yyyy-MM-dd HH24:mi:ss')
AND INS_TASK_DATE <= TO_DATE('2019-09-30 23:59:59','yyyy-MM-dd HH24:mi:ss')
TRUNC(d[,format]):截断日期时间数据
select sysdate,trunc(sysdate),trunc(sysdate,'year') YEAR,to_char(trunc(sysdate,'hh'),'hh24')Hours from dual;