Avatar of Charles Sugden
Charles Sugden
Flag for United States of America

asked on 

SYBASE table locking within a transaction

I have a stored procedure that performs some updates and locks the tables it updates. One of the tables it need not always lock.
UPDATE table1 SET...WHERE...
UPDATE table2 SET...WHERE...
IF EXISTS(select * from table3 where...)
  UPDATE table3 SET ... WHERE...

Will SYBASE always lock for update table3 based upon the stored execution plan or will the lock happen conditionally based upon what was executed?

Regards to all SYBASE lovers...facetiously
Charlie
Sybase Database

Avatar of undefined
Last Comment
Charles Sugden

8/22/2022 - Mon