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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic SQL to disable constraints.

Re: Dynamic SQL to disable constraints.

From: wario <wario_spam_at_insightbb.com>
Date: 21 Sep 2004 06:46:17 -0700
Message-ID: <962c6d85.0409210546.dd7422a@posting.google.com>


Look at:

DECLARE
    CURSOR crConstraints IS
    SELECT 'alter table '|| owner || '.' || constraint_name

        || ' disable constraints' sql
    FROM dba_constraints
    WHERE constraint_type = 'R'
    AND table_name = 'ORDDET';

BEGIN
    for x in crConstraints loop

        execute immediate x.sql;
    end loop;
END;
/ Received on Tue Sep 21 2004 - 08:46:17 CDT

Original text of this message

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