Hii All
I want to drop a table from a procedure dynamically passing table name as in mode parameter from a procedure
for that i have written the following procedure
CREATE OR REPLACE PROCEDURE DEL_TAB(TAB_NAME IN VARCHAR2) AS
V_TAB_NAME VARCHAR2(10);
V_STMT VARCHAR2(50);
BEGIN
V_TAB_NAME:=TAB_NAME;
V_STMT:='DROP TABLE '||V_TAB_NAME;
EXECUTE IMMEDIATE 'V_STMT';
DBMS_OUTPUT.PUT_LINE(V_TAB_NAME||' TABLE DELETED');
END DEL_TAB;
but when ever i am executing it it is giving me some error
ERROR at line 1:
ORA-06550: line 1, column 15:
PLS-00357: Table,View Or Sequence reference 'A' not allowed in this context
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Please Tell me the solution.....
Thanks in Advance
Nitish