title: How do I check in SQLite whether a table exists?
body: <p>How do I, <strong>reliably</strong>, check in SQLite, whether a particular user table exists?</p>
  
  <p>I am not asking for unreliable ways like checking if a "select *" on the table returned an error or not (is this even a good idea?).</p>
  
  <p>The reason is like this:</p>
  
  <p>In my program, I need to create and then populate some tables if they do not exist already.</p>
  
  <p>If they do already exist, I need to update some tables.</p>
  
  <p>Should I take some other path instead to signal that the tables in question have already been created - say for example, by creating/putting/setting a certain flag in my program initialization/settings file on disk or something?</p>
  
  <p>Or does my approach make sense?</p>