日期:2014-05-16  浏览次数:20454 次

oracle_存储过程_删除数据表

--用于删除数据表(via tablename)

create or replace procedure DropTable(tablename in varchar) is

ls_sql varchar2(4000);

v_count number;

v_tablename varchar2(400);

begin

? v_tablename:=upper(tablename);

? ?execute immediate 'drop table '||v_tablename;

? exception

? ? when others then

? ? ?rollback;

? ? ?null;

end DropTable;