PL/SQL运行报错
CREATEORREPLACEPROCEDURECREATE_TABLE(tablenameinvarchar2)AStablecountint:=0;BEGINsele...
CREATE OR REPLACE PROCEDURE CREATE_TABLE
(
tablename in varchar2
)
AS
tablecount int:=0;
BEGIN
select count(1) into tablecount from all_tables where TABLE_NAME=tablename AND OWNER='ZXIN';
if (tablecount=0) then
begin
drop table tablename;
end;
end if;
end;
删除if那段就没问题 要不然就报
错误:PLS-00103: Encountered the symbol "DROP" when expecting one of the following:
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
行:12
文本:drop table tablename;
删除drop table tablename;又报end;错误 展开
(
tablename in varchar2
)
AS
tablecount int:=0;
BEGIN
select count(1) into tablecount from all_tables where TABLE_NAME=tablename AND OWNER='ZXIN';
if (tablecount=0) then
begin
drop table tablename;
end;
end if;
end;
删除if那段就没问题 要不然就报
错误:PLS-00103: Encountered the symbol "DROP" when expecting one of the following:
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
行:12
文本:drop table tablename;
删除drop table tablename;又报end;错误 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询