title: Using Coalesce For Comma Delimited List
body: <p><code>Coalesce will return the first non-null value among its arguments</code> documentation says. I can also use  it like below:</p>
  
  <pre><code>DECLARE @ColumnValue VARCHAR(MAX);
  SELECT @ColumnValue = COALESCE(@ColumnValue+',','') + ColumnValue
  FROM dbo.TableA
  SELECT @ColumnValue
  </code></pre>
  
  <p>According to my understanding, there should be a <code>,</code> at the very front of the output list since at the very beginning there will at least be a comma passed as an argument. Also, if I put some value in the second argument. It appears at the very front instead of the <code>,</code> as I expected.</p>
  
  <p>If someone can please explain the code to me. I will be very grateful.</p>