title: Drop a table in a procedure
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1799128/oracle-if-table-exists">Oracle: If Table Exists</a><br>
    <a href="https://stackoverflow.com/questions/10838558/drop-table-if-it-exists">Drop table if it exists</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to create this procedure but I get an error.</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE SP_VEXISTABLA(NOMBRE IN VARCHAR2)
  IS
  CANTIDAD NUMBER(3);
  BEGIN
  SELECT COUNT(*) INTO CANTIDAD FROM ALL_OBJECTS WHERE OBJECT_NAME = NOMBRE;
  IF (CANTIDAD &gt;0) THEN
      DROP TABLE NOMBRE;
  END IF;
  END;
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>Error(8,1): PLS-00103: Encountered the symbol "END" when expecting one of the following:     ( begin case declare exit for goto if loop mod null pragma    raise return select update while with       &lt;&lt;    continue close current delete fetch lock insert open rollback    savepoint set sql execute commit forall merge pipe purge.</p>
  </blockquote>
  
  <p>Do you know what am I doing wrong? </p>