解决:Oracle 异常 ORA-01861: literal does not match format string

今天在ORACLE数据库中插入由Navicat 从SQL中导出的insert语句,报如下错误:

Oracle 异常 ORA-01861: literal does not match format string

字面意思:(字符串格式不匹配)

经查发现是时间字段格式问题

某字段值为:'2015-05-19 00:00:00.000'

改为to_date('2015-05-19 00:00:00' , 'yyyy-mm-dd hh24:mi:ss')  OK!

总结:Oracle真的很烦!时间字段赋值不能直接按照字符串方式写。

 

posted @ 2022-10-04 00:15  IT情深  阅读(870)  评论(0编辑  收藏  举报