【发布时间】:2013-08-29 18:17:49
【问题描述】:
我有一个我正在尝试使用 jdbc 执行的 oracle 查询。以下是查询。
insert into bd_vehicles_temp select * from bd_vehicles_temp_1
表 bd_vehicles_temp_1 包含大约 7000-10000 行。如果 bd_vehicles_temp_1 中的主键已经存在于 bd_vehicles_temp 中,我会收到 SQLException : Unique key constraint。
我的代码中的异常行是pstmt.executeUpdate()。有没有办法查明 bd_vehicles_temp_1 中导致异常的行。
或者我是否必须遍历 bd_vehicles_temp_1 中的行并一一插入每一行?
提前致谢!
【问题讨论】: