|
-
Autonomous transaction is a bad idea. It won't see any uncommitted changes from your main transaction, and the commit would only apply to the insert in your autonomous transaction.
If you can't use savepoints, you'll need to actually do the test before the insert, so you can NOT INSERT, rather than INSERT/ROLLBACK.
create or replace procedure insert_into_t
as
myCondition boolean ;
begin
if myCondition then
insert into t values ( 1 );
commit;
end if;
end;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|