Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select and insert in same transaction
SELECT fields
FROM table
WHERE some_condition
FOR UPDATE;
Daniel Morgan
Larry Marshall wrote:
> I am new to SQL. I want to do a query:
> select colA, colB, colC from table
> where colDate is null
>
> After this, I want to set colDate of each record selected in the above
> query to the current date.
>
> How can I assure that I update all the selected records from the first
> query and no more. I am worried that between the two DML statements
> further records might have been added having colDate = NULL.
>
> TIA - Larry
Received on Mon Mar 18 2002 - 15:20:30 CST