title: Scan SQL NULL values in golang
body: <p> Using standard database/sql <code>Row.Scan()</code> I have a problem with null values in the row. Without considering possible null values in a row, I can get scan errors like <code>&lt;nil&gt; -&gt; *string</code>. This is quite common using LEFT JOIN queries or weak defined tables missing NO NULL column constraints. </p>
  
  <p>There are <code>sql.NullXXX</code> types (e.g. sql.NullInt64)  which can be used to scan possible null value from a row, and then check if the value is <code>.Valid</code>. However, these types don’t implement JSON marshalling, and those more logic and coding is required.</p>
  
  <p>To solve this, is it better approach to <code>COALESCE()</code> column values in SQL query or do some extra coding in golang code?</p>