title: Why OBJECT_ID used while checking if a table exists or not
body: <p>I need to check if a table in SQL exist or not.</p>
  
  <p>If not it must create one automatically.</p>
  
  <p>Now I researched and found this code:</p>
  
  <pre><code>IF  NOT EXISTS (SELECT * FROM sys.objects 
  WHERE object_id = OBJECT_ID(N'[dbo].[YourTable]') AND type in (N'U'))
  
  BEGIN
  CREATE TABLE [dbo].[YourTable](
  ....
  ....
  ....
  ) 
  
  END
  </code></pre>
  
  <p>Can anyone explain why it says where <code>object_id = OBJECT_ID</code> and what should I put in its place?</p>