title: sqlite3: how to detect rowid alias column (primary key)
body: <p>Using SQLite3, if you create a table like this:</p>
  
  <pre><code>CREATE TABLE MyTable (
  id int primary key,
  --define other columns here--
  )
  </code></pre>
  
  <p>it turns out <code>sqlite3_column_type(0)</code> always returns <code>SQLITE_NULL</code>.
  If I <a href="http://www.sqlite.org/lang_createtable.html#rowid" rel="nofollow">read on a bit</a>, this may well be by design because this column is actually an alias to the internal <code>rowid</code> field.</p>
  
  <p>Still, what is the programatical way to determine a certain column is an/the alias to the <code>rowid</code> field?</p>
  
  <p>(Perhaps related, can I use <code>sqlite3_column_type(x)==SQLITE_NULL</code> to determine if the field of the <em>current</em> record holds <code>NULL</code>?)</p>