if not exists (select 'X' from user_tables where name='exerise') then create table exerise ( dm char(10), mc varchar(100) ); end if;
能够在SQLPlus中执行吗?试了不行。
declare num number; str varchar2(100); begin select max(1) into num from user_tables where table_name='EXERISE'; if num is null then str:='create table exerise ( dm char(10), mc varchar(100 )'; execute immediate str; end; /
create table exerise
(
dm char(10),
mc varchar(100)
);
end if;
num number;
str varchar2(100);
begin
select max(1) into num from user_tables where table_name='EXERISE';
if num is null then
str:='create table exerise
(
dm char(10),
mc varchar(100
)';
execute immediate str;
end;
/