ora-00001删除之后还提示

今天遇到个奇怪的现象

SqlMapClient operation; SQL [];   --- The error occurred in config/ibatis/baseinfo.xml.  --- The error occurred while applying a parameter map.  --- Check the insertBaseinfo-InlineParameterMap.  --- Check the statement (update failed).  --- Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: 违反唯一约束条件 (COTTON.UN_BASEINFO_USERCODE); nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:   --- The error occurred in config/ibatis/baseinfo.xml.  --- The error occurred while applying a parameter map.  --- Check the insertBaseinfo-InlineParameterMap.  --- Check the statement (update failed).  --- Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: 违反唯一约束条件 (COTTON.UN_BASEINFO_USERCODE)


1.通过sql语句删除 ALTER TABLE baseinfo DROP CONSTRAINT UN_BASEINFO_USERCODE; --提示成功

2.再次执行插入,还是报上面的错误

3.再次执行第一步,提示已经没有此约束了,尝试查看此约束

3.1 SELECT constraint_name FROM all_constraints WHERE  owner = 'COTTON';--没有查询到

3.2 select * from dba_constraints t WHERE t.constraint_name='UN_BASEINFO_USERCODE';--也没有查询到

绕进了死胡同,说明已经没有此约束了,但程序还是报错,程序不会骗人的,肯定有某个地方没有更改。

4.直接备份到本地,通过plsql查看,发现index(索引)没有删除,ok,删掉之后一切正常。

你可能感兴趣的:(唯一约束,ORA-00001)