ORA-00001: unique constraint (IPMS_BASE_1003.SYS_C00478730) vi

插入oracle数据库时报错:

org.springframework.dao.DuplicateKeyException: com.datangwealth.ipms.file.mapper.AppendixMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: ORA-00001: unique constraint (IPMS_BASE_1003.SYS_C00478730) violated

; ORA-00001: unique constraint (IPMS_BASE_1003.SYS_C00478730) violated
; nested exception is java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (IPMS_BASE_1003.SYS_C00478730) violated

解决方法:

select * from user_constraints where table_name='表名';

将报错的那个约束删掉或者检查是否真的重复

ALTER TABLE  表名 DROP CONSTRAINT SYS_C00478730;
 

你可能感兴趣的:(java,spring,开发语言)