declare
numb number;
begin
select count(*) into numb from user_tables where table_name='HAOMA';
if numb>0 then
execute immediate 'drop table haoma';
end if;
execute immediate 'create table haoma as select distinct service_id from service';
end;请问这个哪里有问题呀?
numb number;
begin
select count(*) into numb from user_tables where table_name='HAOMA';
if numb>0 then
execute immediate 'drop table haoma';
end if;
execute immediate 'create table haoma as select distinct service_id from service';
end;请问这个哪里有问题呀?
declare
numb number;
begin
select count(*) into numb from user_tables where table_name = 'HAOMA';
if numb > 0 then
execute immediate 'drop table haoma';
execute immediate 'create table haoma as select distinct service_id from service';
end if;
end;
--这样?
declare
numb number;
begin
select count(*) into numb from user_tables where table_name='HAOMA';
if numb>0 then
execute immediate 'drop table haoma';
execute immediate 'create table haoma as select distinct service_id from service';
end if;
end;