Recent

11.ORA-00001: unique constraint




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.
This error is related to the duplicate data. Whenever you try to insert same unique/primary key you will encounter this error.

Example:

SQL> CREATE TABLE Employee (
2 EMP_ID VARCHAR(10) PRIMARY KEY,
3 name VARCHAR(20),
4 address VARCHAR(20)
5 );
Table created.
SQL>
SQL> INSERT INTO Employee VALUES ('0602751122','Sree Mendu','Cincinnati OH');
1 row created.
SQL> INSERT INTO Employee VALUES ('0602751122','Sree Ram','Cincinnati OH');
INSERT INTO Students VALUES ('0602751122','Sree Ram','Cincinnati OH')
*
ERROR at line 1:
ORA-00001: unique constraint (AGHT.SYS_C005092) violated

No comments:

Post a Comment

Bug-dbug Designed by Bugdbug - Developed by Belson Raja Copyright © 2016

Theme images by Bim. Powered by Blogger.
Published By Bugdbug India