Database Administration (MOSC)

MOSC Banner

constraint check ordering

edited Oct 19, 2009 3:20AM in Database Administration (MOSC) 14 commentsAnswered
I have a table with multiple unique indexes on it; this, of course, implicity means multiple unique constraints.  If I attempt to insert a row which violates multiple constraints, what controls the order in which these indexes/constraints are checked? 

I have a  procedure which wraps inserts into this table.  If a particular constraint -- eg, primary key -- is violated, the procedure will handle the exception and do an update instead of an insert.  If a different unique constraint is violated, it can't handle the exception, and will raise it back to the caller.  In this case, the order that the constraints are checked, and the specific error raised, determines the behavior of this procedure.  The only thing I can find is that it seems to check the order in which the indexes are created.  Is there anything more specific than this?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center