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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle transaction question

Re: Oracle transaction question

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Fri, 03 Dec 2004 20:02:41 -0800
Message-ID: <1102132864.526580@yasure>


Bill wrote:

> Hi all,
> Can someone help with this question?
>
> In a program, 2 SQL statements are executed in the same transaction. The
> first is a SELECT statement based on a status column in a table equals to
> "X", e.g. SELECT * FROM TABLE1 WHERE STATUS='X'. The second is a DELETE
> statement, deleting all rows with STATUS='X', e.g. DELETE FROM TABLE1 WHERE
> STATUS='X'. Both are in one transaction.
>
> During the execution of this transaction, after the SELECT but before the
> DELETE, another program inserts another row into TABLE1 with STATUS='X'.
> Will the newly inserted row also be deleted?
>
> Thanks,
> Bill

This has the look of homework so here's a hint. Try it and see what happens.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Fri Dec 03 2004 - 22:02:41 CST

Original text of this message

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