Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Unique index behavior question

Re: Unique index behavior question

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 23 Mar 2001 21:17:04 -0800
Message-ID: <3ABC2DD0.9B204990@exesolutions.com>

> Let's say a table has a column, call it A, that has a unique index on
> it.
>
> Client 1 and client 2 start transactions. Client 1 adds or updates a row
> in the table with a particular value for column A. Then, client 2 tries
> to add or update a different row using the same value for column A, and
> does so before client 1 commits its transaction.
>
> Will client 2 receive an immediate error when it attempts to make its
> change, or will the error occur when the clients commit their
> transactions? Will the last client that commits receive the error, or
> the last client to perform the update?

Nothing happens until a commit is issued.

Whoever commits first wins.

Whoever commits second loses.

Daniel A. Morgan Received on Fri Mar 23 2001 - 23:17:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US