调用oracle 各种报错总结---待续

  • ORA-01747: user.table.column, table.column 或列说明无效 

   原因之一是sql语句拼接错误,多了逗点;二是使用到了oracle的关键字所致 

 

查看官方文档:
ORA-02449: unique/primary keys in table referenced by foreign keys

Cause: An attempt was made to drop a table with unique or primary keys referenced by foreign keys in another table.
Action: Before performing the above operations the table, drop the foreign key constraints in other tables. You can see what constraints are referencing a table by issuing the following command: SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = "tabnam";
 
我是在drop表时报的这个错,所以在drop语句后加上 cascade constraints;就执行通过了
 
  • Oracle异常ORA-01861:literal does not match format string(字符串格式不匹配)
    •  问题原因:to_date 或 to_char 需要添加 时间格式,如:yyyy-MM-dd HH24:mi:ss, 否则会提示这个错误,或者本身该字段数据有误,null或空字符串或时间格式不正确(如小时只能在0-24之间,但是小时的值是53时就会报这个错)

 

posted @ 2015-05-07 17:55  NewLife365  阅读(458)  评论(0编辑  收藏  举报