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 table locks. you will see that a lock is being held against the table because of the above update statement. I'm not sure of the impact here, but a lock is a lock. maybe someone else on the list can give us a better answer of what is being held. Tom Mercadante Oracle Certified Professional -----Original Message----- Sent: Wednesday, January 15, 2003 11:29 AM To: Multiple recipients of list ORACLE-L > 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 or Rollback. This appears to be > causing some locking problems, but how can any thing be locked if no rows > were updated? > Platform is 8.1.7 -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: John Dunn INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Mercadante, Thomas F INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).