【发布时间】:2015-11-27 05:26:49
【问题描述】:
我正在尝试将值插入到 sql 表中,但在 sql 查询中出现此错误
SQL Error: ORA-00001: unique constraint (uniqueKey) violated
00001. 00000 - "unique constraint (%s.%s) violated"
*Cause: An UPDATE or INSERT statement attempted to insert a duplicate key.
For Trusted Oracle configured in DBMS MAC mode, you may see
this message if a duplicate entry exists at a different level.
*Action: Either remove the unique restriction or do not insert the key.
有没有办法跳过这个错误并继续插入。像这样的
try
insert query
catch (unique constraint error)
continue inserting other values
【问题讨论】:
-
这可能是 this question 的副本。