On 15 Nov 2001 at 12:12 (-0500), David Ford wrote:
| Yes, I know that works. I want to figure out how to use SELECT ... FOR
| UPDATE with UPDATE because I will have a need to lock these certain rows
| and do a bit more than just 'count'.
AFAIK, you need to do the following the use the SELECT ... FOR UPDATE
BEGIN;
SELECT ... FOR UPDATE;
UPDATE ... SET ...;
COMMIT;
Any other session attempting an update on the selected for update rows
will block on the locked rows until the end of that xact.
hth.
brent
--
"Develop your talent, man, and leave the world something. Records are
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing." -- Duane Allman