title: What is the data type of a computed column?
body: <p>When you <code>CREATE TABLE</code> using <code>CASE</code> expression to create a computed column, you do not explicitly define the data type of this column:</p>
  
  <pre><code>CREATE TABLE OrderDetail
  ( OrderID INT
  , ProductID INT
  , Qty INT
  , OrderDate DATETIME
  , ShipDate DATETIME
  , STATUS AS CASE
         WHEN shipdate is NULL AND orderdate &lt; DATEADD( dd, -7, GETDATE()) THEN 3 
         WHEN shipdate is NOT NULL THEN 2 
         ELSE 1
     end
   )
  GO
  </code></pre>
  
  <p>How SQL Server decides the data type of this column?</p>