Problem while executing the delete statement in the Procedure [message #336841] |
Tue, 29 July 2008 03:29 |
sen_careers@yahoo.co.in
Messages: 4 Registered: July 2008 Location: India
|
Junior Member |
|
|
Hi Experts,
Please verify the procedure below .....
create or replace procedure senthiltest
is
table_name varchar2(30);
cursor senthil1 is
select tname from tab;
BEGIN
open senthil1;
LOOP
fetch senthil1 into table_name;
delete from table_name; //this statement is not working
exit when senthil1%notfound;
DBMS_OUTPUT.PUT_LINE('Deleted Table :'||table_name);
END LOOP;
close senthil1;
END;
In this procedure the Delete statement is not working saying that table_name is an invalid table name. (i.e) The variable table_name is not known for the delete statement.
How can I delete all the table that are created by me by running one single procedure like this ???.....
Thanks in advance,
Senthilkumar.Parthiban
|
|
|
|
|