chokka
asked on
Oracle : How to identify columns involved in a Table for Unique Constraint Exception ?
Oracle : How to identify columns involved in a Table for Unique Constraint Exception ?
While trying to Insert, I am getting Exception as
ORA-00001: unique constraint (Table) violated.
Without dropping the Unique Constraint, Is it possible to Insert ?
Is there any way to Turn ON or OFF the Constraint.
While trying to Insert, I am getting Exception as
ORA-00001: unique constraint (Table) violated.
Without dropping the Unique Constraint, Is it possible to Insert ?
Is there any way to Turn ON or OFF the Constraint.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
slightwv and Johnsonone , Thank you for your suggestion.
I will not disable or remove the constraint.
Thank you. This post is closed. Please dont comment further.
I have some issue with my browser and so, i am not able to Accept Solution option. I will do it later.
I will not disable or remove the constraint.
Thank you. This post is closed. Please dont comment further.
I have some issue with my browser and so, i am not able to Accept Solution option. I will do it later.
ASKER
Thank you !!
Look in user_cons_columns for the CONSTRAINT_NAME.
select * from user_cons_columns where constraint_name='SOME_NAME
where SOME_NAME is the constraint name in question.
>>Without dropping the Unique Constraint, Is it possible to Insert ?
Not without resolving the violation. Constraints can be deferrable in that they are not checked until COMMIT.
>>Is there any way to Turn ON or OFF the Constraint.
You can 'disable' it but see above: You would need to resolve the conflict before it was enabled again. AND once disabled, all sorts of other 'bad' data can sneak in!