delete from * where name = "" ----没有这样用的吧, delete from tablename where ...
试试: delete from (select table_name from tabs) where name is null
delete tablename1 where name = '' or name is null
错了!错了!应该这样: 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;
这样:delete 表名 where name = ''
oracle中: delete from table_name where nvl(name,'')='';
这句话没错!
delete from tablename where ...
delete from (select table_name from tabs) where name is null
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;
delete from table_name where nvl(name,'')='';
DELETE * FROM TABLE WHERE COLLUM IS NULL