title: Common Table Expression, why semicolon?
body: <p>Usually in <code>SQL Server</code> Common Table Expression clause there is semicolon in front of the statement, like this:</p>
  
  <pre><code>;WITH OrderedOrders AS --semicolon here
  (
      SELECT SalesOrderID, OrderDate,
      ROW_NUMBER() OVER (ORDER BY OrderDate) AS 'RowNumber'
      FROM Sales.SalesOrderHeader 
  ) 
  SELECT * 
  FROM OrderedOrders 
  WHERE RowNumber BETWEEN 50 AND 60
  </code></pre>
  
  <p>Why?</p>