When doing an update that fails to update any rows, does a Rollback or a
Commit need to be done at the end?
We have a problem with some code where an update is attempted, but after
the SQL command has run SQL%ROWCOUNT = 0 so no rows were updated. The
program does not then perform a Commit
John - What SQL query was used to select these rows. Was it SELECT FOR
UPDATE?
Dennis Williams
DBA, 40%OCP
Lifetouch, Inc.
[EMAIL PROTECTED]
-Original Message-
Sent: Wednesday, January 15, 2003 10:29 AM
To: Multiple recipients of list ORACLE-L
When doing an update that fails to
Title: RE: oracle locking question
Yes ... because you are doing a transaction. Row count 0 is the result, but at that time transaction is still in uncommitted state. Please issue a commit or a rollback to complete the transaction ..
Raj
John,
I just ran across this the other day.
The answer is, you must perform a commit or rollback to release the locks.
You can see this by doing something as simple as
update table
set column_name='a value'
where pk_column=0;== make sure there is no record for this value.
then, look for
I believe the lock was obtained on the table prior to updating the rows.
So a commit would signal an end to the work and release any objects that
were locked.
Either that or the session has some kind of separation or withdrawal
problem.:)
RWB
--
Please see the official ORACLE-L FAQ:
]]
Sent: Wednesday, January 15, 2003 11:29 PM
To: Multiple recipients of list ORACLE-L
Subject: oracle locking question
When doing an update that fails to update any rows, does a Rollback or a
Commit need to be done at the end?
We have a problem with some code where an update