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: pl/sql - help!!

Re: pl/sql - help!!

From: John Ennis <john_at_pjpsoft.com>
Date: 1997/02/05
Message-ID: <32F7DC09.76D0@pjpsoft.com>#1/1

Here is a procedure (T_OFF) which disables the primary key constraint T_PK of a table called T, using the dbms_sql package :

SQL> create or replace procedure t_off as

    dml_stmnt INTEGER;
BEGIN
    dml_stmnt := dbms_sql.open_cursor;
    dbms_sql.parse(dml_stmnt , 'ALTER TABLE t disable constraint t_pk',

                   dbms_sql.v7);

    dbms_sql.close_cursor(dml_stmnt );
EXCEPTION
WHEN OTHERS THEN
    dbms_sql.close_cursor(dml_stmnt );
END;
/

You can use it to create tables as well.

Hope this helps ... Received on Wed Feb 05 1997 - 00:00:00 CST

Original text of this message

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