У меня есть следующий PL/SQL:таблица падения, если он существует
declare
i_cnt number;
begin
select count(1) into i_cnt
from dba_tables
where table_name = upper('foo')
and owner = upper('bar');
if i_cnt > 0 then
drop table foo; -- <--- error this line
end if;
end;
Из которого я получаю эту ошибку.
ORA-06550: line 6, column 5:
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> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
Как я могу отказаться от таблицы в процедуре?
Смотри также: http://stackoverflow.com/questions/1799128/ oracle-if-table-exists/1801453 –