title: Oracle function to drop table if exists
body: <p>I have the following bit of code:</p>
  <pre><code>BEGIN
      SELECT
          COUNT(*)
      INTO table1_exists
      FROM
          sys.all_tables
      WHERE
          table1_name = upper('table1');
  
  EXCEPTION
      WHEN no_data_found THEN
          table1_exists := 0;
  END;
  
  IF ( table1_exists ) = 1 THEN
      EXECUTE IMMEDIATE q'[Drop Table table1]';
  END IF;
  </code></pre>
  <p>How could I create a SQL function to, given a table name as an input, drop if exists that table?</p>