title: Informix and DROP COLUMN if exists
body: <p>I am trying to write "re-usable" SQL script with <code>ADD COLUMN</code> clause for Informix server. Normally, I can only run it once, because then the column already exists and it cannot be added again. And I cannot just add <code>DROP column</code> as prior statement, because it would fail during the first execution. I need something like DROP COLUMN IF EXISTS, but unlike dropping other SQL entities, it is not available for columns.</p>
  
  <p>I can ask system tables whether the column is present in then DB via:</p>
  
  <pre><code>SELECT c.colname
    FROM "informix".systables AS t
    JOIN "informix".syscolumns AS c ON t.tabid = c.tabid
   WHERE c.colname = 'col_name' and t.tabname = 'tab_name'
  </code></pre>
  
  <p>plus I found some proposed solutions for workarounds, but I guess they are for different SQL servers, since I cannot figure out how to put it together into valid SQL script acceptable for my Informix.</p>
  
  <p>Any clues? Or is it mission impossible?</p>