Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: DDL-statement in PL/SQL block
Dimitry,
You cannot use a DDL statement in PL/SQL block. The solution is to use dynamic SQL.
You may use procedure like this:
PROCEDURE drop_table (p_table_name IN VARCHAR2) IS
v_sql_string varchar2(100); v_sql_cursor number; v_sql_result number;
and call it drop_table (<your_table>);
Regards,
Paul
"Dimitry" <dmitry_av_at_urbis.net.il> wrote in message
news:39844307_at_news.bezeqint.net...
> Hello !
> Does anyone know if it is possible to
> put a DDL statement into PL/SQL-block, for example:
>
> ****************
> BEGIN
> IF <condition> THEN
> DROP TABLE <table>
> END IF;
> END;
> ****************
>
> Thank you in advance.
>
>
Received on Sun Jul 30 2000 - 00:00:00 CDT