Hi,
Ignorant SQL question:
If I do a SELECT during a transaction, before COMMIT, does the select
sees whatever has been done earlier in the transaction?
Or in other words with something like:
BEGIN
INSERT INTO some_table something
SELECT * FROM some_table
COMMIT
SELECT * FROM some_table
Should the two select have the same results? (Assuming the COMMIT does
fails)
Thank you
--
Lee Fesperman - 20 Feb 2005 02:16 GMT
> Hi,
>
[quoted text clipped - 13 lines]
> Should the two select have the same results? (Assuming the COMMIT does
> fails)
Assuming you meant "the COMMIT *doesn't* fail", the two selects will have the same
results. IOW, the first select will see any prior changes in the transaction.

Signature
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
fabrice.gautier@gmail.com - 20 Feb 2005 02:35 GMT
Yes I meant: "doesnt fail"
Thanks
Alan - 20 Feb 2005 04:04 GMT
> Hi,
>
[quoted text clipped - 17 lines]
>
> --
Your session should see the same results before and after the commit..
Another user will see the "uninserted" version priot to the commit, and the
same version you see after the commit.
DA Morgan - 20 Feb 2005 22:32 GMT
> Hi,
>
[quoted text clipped - 16 lines]
> Thank you
> --
The answer to your question is entirely dependent upon which database
you are using and the isolation level associated with the transaction.
As you've not bothered to identify the database and isolation level no
accurate answer is possible.

Signature
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)