【发布时间】:2014-10-16 09:21:11
【问题描述】:
declare
doesExists number:=0;
begin
select count(1) into doesExists from tab where tname = 'EOSS2G_GREEN_RLDEP';
if doesExists = 1
then
execute immediate 'drop table EOSS2G_GREEN_RLDEP';
--execute immediate 'create table EOSS2G_GREEN_RLDEP as select * from EOSS2G_RLDEP';
else
execute immediate 'create table EOSS2G_GREEN_RLDEP as select * from EOSS2G_RLDEP';
end if;
end;
/
我得到的错误信息是:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
& = - + ; < / > at in is mod remainder not rem
<> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
Position: 28, Line: 2, Column: 21
SQL: declare
doesExists number:=0
^-- error here -- ORA-06550: line 2, column 21:
我已经在网上查看了各种解决方案,但它们仍然没有帮助解决问题。
有人可以帮我解决这个问题吗?
【问题讨论】: