SQL- Pandora.
, SQL. SQL , . ( , , , , . Oracle .)
, . , , , , .
.
drop table test1;
create table test1(my_field varchar2(100), some_val varchar2(100));
insert into test1 values('A', 'AAA');
commit;
,
?
create or replace function dangerous_function return number is
pragma autonomous_transaction;
begin
delete from test1;
commit;
return 1;
end;
/
, ?
update test1
set my_field = 'b'
where some_val IN ('AAA')
and 1 = (select dangerous_function from dual)
, , , , . , ?
SQL
, UPDATE DML:
update
test1
set my_field = 'b'
where some_val IN ('AAA')
and 1 = (
with function dangerous_function return number is
pragma autonomous_transaction;
begin
delete from test1;
commit;
return 1;
end;
select dangerous_function from dual
);
, --+ WITH_PLSQL. ORA-32034: unsupported use of WITH clause. , . - , .
?
, . ? SQL-. , .