- create_date 格式为date
可行sql:
- select * from bus_task_order t where t.create_date>sysdate
- select * from bus_task_order t where t.create_date=to_date('2017-11-8 11:13:28','yyyy-MM-dd hh24:mi:ss')
- exe_date 格式为varchar2
可行sql:
- select * from danage_action_task tt where tt.exe_time>to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss')
- select * from danage_action_task tt where tt.exe_time>to_char(trunc(sysdate), 'yyyy-mm-dd hh24:mi:ss')
- select * from danage_action_task tt where tt.exe_time>'2017-11-08 11:13:28' varchar2格式时天不带0是错的
select sysdate from dual ->2017-11-8 11:13:28
select trunc(sysdate) from dual; ->2017-11-8
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;->2017-11-08 14:42:28