错了!错了!应该这样:
declare
cursor gettablename is select table_name from tabs;
temp varchar2(30);
begin
open gettablename;
loop;
fetch gettablename into temp;
exit when gettablename%notfound;
begin
execute immediate 'delete from '||temp||' where name is null;
exception
when others then
null;
end;
end loop;
end;