title: Divide Null by a number in SQL
body: <p>I got a question: if I have a <code>Product</code> table in SQL which has columns <code>Product ID</code>, <code>TotalPrice</code>, <code>NumberOfUnits</code></p>
  
  <p>Now I need to calculate the <code>unitPrice</code> of the product.</p>
  
  <p>This can be calculated by dividing the <code>TotalPrice</code> by <code>NumberOfUnits</code>.</p>
  
  <p>Now the question is: if the <code>totalPrice</code> is <code>Null</code> and <code>NumberOfUnits</code> is 45.</p>
  
  <p>What will the output be?</p>
  
  <pre><code>Select 
      ProductID,
      (TotalPrice / NumberOfUnits) as UnitPrice 
  from ProductTable
  </code></pre>
  
  <p>What will be the output?</p>
  
  <p>And if the answer is null, how can we handle this?</p>