title: SQL Server - ISNULL not working on Update Query
body: <p>Rather than have a NULL in a column, I want a 0 to be present.  </p>
  
  <p>Given the following two tables:</p>
  
  <pre><code>TABLE1
  ClientID        OrderCount
  1               NULL
  2               NULL
  3               NULL
  4               NULL
  
  
  Table2
  ClientID        OrderCount
  1               2
  3               4
  4               6
  </code></pre>
  
  <p>NOTE: The OrderCount column in both tables is <code>INT</code> datatype.  </p>
  
  <pre><code>UPDATE TABLE1
  SET OrderCount = ISNULL(TABLE2.OrderCount,0)
  FROM TABLE1
  INNER JOIN TABLE2 ON TABLE2.ClientID = TABLE1.CLIENTID
  </code></pre>
  
  <p>When I look at table1, I see this:</p>
  
  <pre><code>ClientID        OrderCount
  1               2
  2               NULL
  3               4
  4               6
  </code></pre>
  
  <p>So, I thought to myself - "Obviously, I should be using <code>NULLIF</code> and not <code>ISNULL</code>", so I reversed them.  Same result.  </p>
  
  <p>What am I doing wrong here?  How do I get a 0 rather than a <code>NULL</code> in the column?</p>