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_tab le
WHERE app_id = app_id_in;
-- Update the next id on the table
UPDATE owner.my_id_tab le
SET next_id = next_id_out + 1
WHERE app_id = app_id_in;
I need to make sure that nothing changes the id table between me
selecting the id and updating the table with the next available id.
thanks
andrew
PS. yes I am new to oracle :)
scenerio:
--TODO - LOCK THIS ROW
-- Return the next id
SELECT next_id
INTO next_id_out
FROM owner.my_id_tab le
WHERE app_id = app_id_in;
-- Update the next id on the table
UPDATE owner.my_id_tab le
SET next_id = next_id_out + 1
WHERE app_id = app_id_in;
I need to make sure that nothing changes the id table between me
selecting the id and updating the table with the next available id.
thanks
andrew
PS. yes I am new to oracle :)
Comment