title: Checking if a Column exists in Database table
body: <p>I am using the following code to check if a Column exists, when not then create it.</p>
  
  <pre><code>&lt;cfquery name="qSelect" datasource="#dbname#"&gt;
      select Top 0 * from Elements
  &lt;/cfquery&gt;
  
  &lt;cfif not ListFindNoCase(qSelect.columnlist,"idLang")&gt;
     &lt;cfquery name="qAlterTable" datasource="#dbname#" dbtype="ODBC"&gt;
        ALTER TABLE Elements ADD idLang varchar(200) NULL
     &lt;/cfquery&gt;
  &lt;/cfif&gt;
  </code></pre>
  
  <p>Can someone suggest if there is better way to do this?</p>