Newbie Q: DROP Table in PL/SQL

From: Mathew <mbsev_at_yahoo.com>
Date: 16 Jul 2001 01:10:26 -0700
Message-ID: <4cdb5682.0107160010.6b902149_at_posting.google.com>


Hi

[Quoted] [Quoted] I want to drop an ORACLE table in a PL/SQL script, but before I drop the table I want to first check that it exists.

I tried something like:

BEGIN
  if TableName.EXISTS(1) THEN

     drop table TableName;
  end if;
END; I got a really horrible cryptic error message as follows:



ERROR at line 3:
ORA-06550: line 3, column 4:
PLS-00103: Encountered the symbol "DROP" when expecting one of the
following:

begin declare exit for goto if loop mod null pragma raise return select update while <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback savepoint set sql execute commit forall
<a single-quoted SQL string>

Any Help will be greatly appreciated.

Thanks in advance

Matt. Received on Mon Jul 16 2001 - 10:10:26 CEST

Original text of this message