Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Wanted:PL/SQL to Disable & Enable Constraints
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
![]() |
![]() |