Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Disabling check constraints
On Mon, 16 Oct 2006 06:30:53 -0700, Valentin Minzatu wrote:
> You can also do it dinamically, using "execute immediate":
Thank you. I know I can do that, but being from the old school, I chose to use SQL generating SQL. From the aesthetic point of view, I find SQL generating SQL more acceptable then PL/SQL scripts.
> BEGIN
> FOR c IN (SELECT table_name, constraint_name FROM user_constraints
> WHERE constraint_type = 'C' )
> LOOP
> EXECUTE IMMEDIATE 'ALTER TABLE '||c.table_name||' DISABLE
> CONSTRAINT '||c.constraint_name;
> END LOOP;
> END;
> /
>
> More details about execute immediate can be found in "PL/SQL Guide and
> Reference".
What makes you think that I need more details about execute immediate?
-- http://www.mladen-gogala.comReceived on Mon Oct 16 2006 - 18:05:27 CDT