Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How do I lock Multiple Records?

Re: How do I lock Multiple Records?

From: Martin Speight <martin_at_aspeight.freeserve.co.uk>
Date: Mon, 22 Feb 1999 18:47:19 -0000
Message-ID: <7as8gk$qu5$1@news6.svr.pol.co.uk>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US