select to_date(CAPTURE_TIME,'yyyy-mm-dd hh24:mi:ss') from MGMT_BASELINE
12:03:49 [SELECT - 0 row(s), 0.000 secs] [Error Code: 1861, SQL State: 22008] ORA-01861:
literal does not match format string
... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000 sec [0 successful, 0 warnings, 1 errors]
初学oracle 为什么会报错呢?
------解决思路----------------------
CAPTURE_TIME本身就是date类型,为啥还要to_date啊,直接用就可以
可以用to_char转化为字符串
select to_char(CAPTURE_TIME,'yyyy-mm-dd hh24:mi:ss') from MGMT_BASELINE