Lock Works like this: PART 1-A: Blast ANY OLD LOCKS PART 1-B: Locks without corresponding Session ID's
PART 2: First TRY to LOCK entire Table - if can't - someone else has it. (Loop to try a couple times) (TABLE LOCK= TABLE ID, ROWID=0)
PART 3: Once Table Lock Established, IF ROWID=0 - see if other locks row level exist, if they do - lose the table lock... keeping table locked not permitted, others own rows.
PART 4: If a ROW ID is Specified, lock the ROW and then Lose the Table Lock.
PART 5: If a COL ID is Specified, lock the COL and then Lose the Table Lock.
PART 6: If a ROW and COL ID Are Specified, lock the COL and then Lose the Table Lock.
PART 7: return true or false to indicate lock granted