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: Valentin Minzatu <valentinminzatu_at_yahoo.com>
Date: 17 Oct 2006 07:29:20 -0700
Message-ID: <1161095360.731108.63100@m73g2000cwd.googlegroups.com>


Mladen,

The answer was meant to help Alex therefore the pointer to the documentation. There is no need to take it personally.

Throwing arrows at people is not a habit of mine (I may do it from time to time without intending it, but this is not the case). As you can see from my post, I didn't say your solution is wrong. I only offered another option.

Cheers,
Valentin

On Oct 16, 7:05 pm, Mladen Gogala <mgogala.spam-me-..._at_verizon.net> wrote:
> 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 Tue Oct 17 2006 - 09:29:20 CDT

Original text of this message

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