Oracle errors oracle pl sql error ora00018

Oracle error ORA-00001: unique constraint violated

Cause of ORA-00001:

This Oracle error means that an attempt has been made to insert a record with a duplicate (unique) key. This Oracle error pl sql ora will also be generated if an existing record is updated to generate a duplicate (unique) key.

Remedy of ORA-00001:

Only one of the following will be appropriate:

1) Remove the unique restriction. Change the restriction to allow duplicate keys. An index could be changed to be a non-unique index, but remember that the primary key must always be unique.

2) Do not insert the duplicate key.

The Oracle plsql error ORA-00001 gives the name of the constraint that has been violated, but not the name of the table. To identify the table and find out all the relevant information about the index use Oracle Schema Manager - the name of the constraint given in the error will match with the name of the corresponding index.
select table_name from all_indexes where index_name='<index-name>';
this view ('all_indexes') also contains some other information about the index, such as its uniqueness. To identify the files that together constitute the index:
select * from all_ind_columns where index_name='<index-name>';

 

ORA-00001 error unique constraint violated



 
Oracle9i Oracle10g
     
  24-02-2007Oracle Errors PLSQL ORA-00001: Unique constraint violated
     
  29-11-2006 Guida Oracle 10g
     
  19-02-2007 Oracle Server
     
 
 
Oracle Functions PLSQL  l  Exceptions  l  Oracle errors codes   l  Oracle Collaborations Suite  l  Products  l  Contact
ORA-00020