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

Home -> Community -> Usenet -> c.d.o.tools -> Can a Stored Proc DROP a table?

Can a Stored Proc DROP a table?

From: Sean <dolans_at_my-deja.com>
Date: 2000/06/08
Message-ID: <8houfs$gbl$1@nnrp1.deja.com>#1/1

I would like to create a stored procedure that when called, drops a table and then recreates it. Can a stored procedure accomplish this? I have tried the statment DROP table tbl_test; in my PL/SQL code, but it gives me an error.

Any ideas?

Thanks,
Sean

CODE:



CREATE OR REPLACE PROCEDURE SP_TEST
(intSuccess OUT NUMBER)
IS
BEGIN
 drop table test;
 intSuccess := 1;
END;
/

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Jun 08 2000 - 00:00:00 CDT

Original text of this message

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