title: Catching an exception while altering a table in Oracle
body: <p>I'm trying to write a command in Oracle that will wither ADD or MODIFY a column depending on whether or not it already exists.  Basically something like:</p>
  
  <pre><code>BEGIN
  
    ALTER TABLE MY_TABLE ADD ( COL_NAME VARCHAR2(100 );
  
    EXCEPTION WHEN OTHERS THEN
      ALTER TABLE MY_TABLE MODIFY ( COL_NAME VARCHAR2(100) );
  
  END;
  </code></pre>
  
  <p>However, Oracle complains about having the ALTER command inside of BEGIN.  Is there a way to achieve this using a single SQL command in Oracle?</p>
  
  <p>Thanks!</p>