Oralce在begin 和end 之间创建数据表时,会出现如标题的错误。
语句如下:
begin
create table create table temp_status as
select * from into_status
end;
按下F8进行执行语句会出现如下错误
错误:PLS-00103: 出现符号 "CREATE"在需要下列之一时:
begin case declare exit
for goto if loop mod null pragma raise return select update
while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
行:31
解决方法:
begin
execute immediate 'create table create table temp_status as
select * from into_status';
end;