Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do I lock Multiple Records?
Just select for update will do it :-
SELECT *
FROM TAB1
WHERE ID=1 FOR UPDATE;
INSERT ...
COMMIT;
John Francis Lundy wrote in message <36d18e78.0_at_news.proweb.co.uk>...
>I need to be able to lock mulitple records the scenario is as follows:
>
>Records in table:
>
>ID Date StartTime EndTime
>1 1/1/99 10:00 11:00
>1 1/1/99 12:00 14:00
>1 1/1/99 14:00 17:00
>2 1/1/99 10:00 17:00
>
>
>I need to add another record for ID 1 on 1/1/99, 07:00, 09:00
>
>I think I need to lock all records for ID 1 on 1/1/99
>Check that the time does not overlap
>create a new record if ok
>then unlock all ID 1 records
>How can I do this? Oracle 7.3
>
>Thanks for much needed help
>
>
>
Received on Mon Feb 22 1999 - 12:47:19 CST