Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Disabling check constraints

Re: Disabling check constraints

From: Mladen Gogala <mgogala.spam-me-not_at_verizon.net>
Date: Mon, 16 Oct 2006 23:05:27 GMT
Message-Id: <pan.2006.10.16.23.05.28.521288@verizon.net>


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.com
Received on Mon Oct 16 2006 - 18:05:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US