Answer the question
In order to leave comments, you need to log in
Are data changes available during the execution of a transaction in Oracle?
DBMS Oracle.
During the execution of a transaction, an insert (INSERT) or update (UPDATE) of data occurs in one table. In the same transaction, a stored procedure is called that uses the same table to get the result.
Do I understand correctly that in Oracle's default READ COMMITED isolation level, changes made during a transaction are not visible when reading within the same transaction? That is, my stored procedure does not see data inserted or updated earlier in the transaction?
What isolation level should be set so that the read sees the changes made during the transaction?
Answer the question
In order to leave comments, you need to log in
You misunderstand. Within one session, you can see all the uncommitted changes made in that session. If your stored procedure is not standalone, then it will see everything. Yes, and it's easy to check. What prevents you from creating a table, inserting a row there, and then calling a stored procedure that will try to do something with this row.
Within the same transaction, the changes will be visible, but they will not be visible to other transactions until COMMIT.
create table ttt(code varchar2(10));
insert into ttt values('10');
select * from ttt;
-->>10
update ttt set code = '20';
select * from ttt;
-->>>20
drop table ttt;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question