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: Wanted:PL/SQL to Disable & Enable Constraints

Re: Wanted:PL/SQL to Disable & Enable Constraints

From: grjohnson <Johnsog123_at_hotmail.com>
Date: 25 Jul 2003 13:43:46 -0700
Message-ID: <32b8a689.0307251243.427e2ffc@posting.google.com>


BEGIN DECLARE FROM r_disable IN
  (SELECT table_name, constaint_name
  FROM user_constraints
  WHERE constraint_type = 'R'
  AND status = 'ENABLED') LOOP
execute immediate 'ALTER TABLE ' || r_disable.table_name 'DISABLE CONSTRAINT ' || r_disable.constraint_name; END LOOP; END; Cheers

Greg Johnson

> --
> "Albert Zweistein" <azwei_at_web.de> wrote in message
> news:Xns93C0B854DF3A1azweiwebde_at_62.243.74.162...
> > I need one or two PL/SQL's that will let me
> >
> > - Disable ALL Constraints for one or more tables
> >
> > and at a later time
> >
> > - Enable ALL Constraints for one or more tables
> >
> >
> > Please post any answers to the Newstgroup.
> >
> >
> > Thanks - Albert !
Received on Fri Jul 25 2003 - 15:43:46 CDT

Original text of this message

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