SET CONSTRAINTS in procedure results in ORA-922
Hi all. Am running Oracle Enterprise Edition, 11.2.0.2. Am trying to defer constraint validation inside a procedure, but the command to do so isn't recognized. Is there something I'm missing?
Here's a quick-n-dirty sample:
create or replace package bob_test is
procedure cons_test;
end bob_test;
/
create or replace package body bob_test is
procedure cons_test is
cnt number;
begin
set constraints all deferred;
select count(*) into cnt from dual;
end cons_test;
end bob_test;
/
show errors
When I attempt to run this I get the following:
Errors for PACKAGE BODY BOB_TEST:
LINE/COL ERROR
-------- -----------------------------------------------------------------
0