最近做的项目java+oracle,第一次用oracle,出现了很多错误,再次记录
1.ORA-00904: invalid identifier
说明:标识符无效
原因:引用了不存在的列名
2.ORA-00913: too many values
原因:插入的数据比原来的字段名多了
3.ora-00917 missing comma
原因:sql语句中少了括号或逗号或引号
4.ORA-01861: literal does not match format string
原因:没有指定日期格式(oracle和mysql最大的操作区别,插入的时候oracle要指定日期格式)
to_date('2017-05-11 14:20:24' , 'yyyy-mm-dd hh24:mi:ss')
5.ORA-01830: date format picture ends before converting entire input string
原因:日期多了.0,也就是多了毫秒
解决:cast(to_timestamp('2011-12-15 10:40:10.345', 'yyyy-MM-dd HH24:MI:ss.ff') as date)
具体:这里写的很好
http://blog.youkuaiyun.com/h249059945/article/details/8551820
6.ora-00054:resource busy and acquire with nowait specified
原因:没commit
本文针对初次使用Oracle数据库过程中遇到的六种常见错误进行了详细的解析,包括ORA-00904标识符无效、ORA-00913插入数据过多等,并提供了相应的解决办法。
1476

被折叠的 条评论
为什么被折叠?



