title: How do I query if a database schema exists
body: <p>As part of our build process we run a database update script as we deploy code to 4 different environments. Further, since the same query will get added to until we drop a release into production it <em>has</em> to be able to run multiple times on a given database.  Like this:</p>
  
  <pre><code>IF NOT EXISTS (SELECT * FROM sys.tables WHERE object_id = OBJECT_ID(N'[Table]'))
  BEGIN
    CREATE TABLE [Table]
    (...)
  END
  </code></pre>
  
  <p>Currently I have a create schema statement in the deployment/build script.  Where do I query for the existence of a schema?</p>