title: Computed columns with null
body: <p>I am creating a view (using MS sql 2008) with creates a calculated field as a <code>COLUMN1 + COLUMN2</code>. Everything is fine and dandy but: Both <code>COLUMN1</code> and <code>COLUMN2</code> can be NULL.</p>
  
  <p>I want to follow the following rule:</p>
  
  <ul>
  <li>2 + 2 = 4</li>
  <li>2 + NULL = 2</li>
  <li>NULL + 2 = 2</li>
  <li>0 + 0 =  0</li>
  <li>NULL + NULL = NULL</li>
  </ul>
  
  <p>If I use ISNULL(column2, 0), then all the rules will be followed but not the last one.</p>
  
  <p>How do I need to create the view </p>
  
  <pre><code>CREATE VIEW dbo.test
  AS
  SELECT COLUMN1, COLUMN2, (????????) AS CALCULATEDCOL FROM dbo.TabTest;
  GO
  </code></pre>