How to lock a row over a SELECT followed by an UPDATE
From: Andrew Baker <webmaster_at_vbusers.com>
Date: 27 Jul 2004 11:54:18 -0700
Message-ID: <c19b84e5.0407271054.54ae108a_at_posting.google.com>
What is the best way to lock an individual row in the following scenerio:
andrew
Date: 27 Jul 2004 11:54:18 -0700
Message-ID: <c19b84e5.0407271054.54ae108a_at_posting.google.com>
What is the best way to lock an individual row in the following scenerio:
--TODO - LOCK THIS ROW
- Return the next id SELECT next_id INTO next_id_out FROM owner.my_id_table WHERE app_id = app_id_in;
- Update the next id on the table UPDATE owner.my_id_table SET next_id = next_id_out + 1 WHERE app_id = app_id_in;
andrew
PS. yes I am new to oracle :) Received on Tue Jul 27 2004 - 20:54:18 CEST