[code=SQ] declare cnt number(8); begin select count(*) into cnt from tablename; if cnt>0 then delete from tablename; else then dbms_output.put_line('没有数据'); end; [/code]
[code=SQ] declare cnt number(8); begin select count(*) into cnt from tablename; if cnt>0 then delete from tablename; else then dbms_output.put_line('没有数据'); end;[/code]
declare
cnt number(8);
begin
select count(*) into cnt from tablename;
if cnt>0 then
delete from tablename;
else then
dbms_output.put_line('没有数据');
end; [/code]
declare
cnt number(8);
begin
select count(*) into cnt from tablename;
if cnt>0 then
delete from tablename;
else then
dbms_output.put_line('没有数据');
end;[/code]