title: Convert a SQL query result table to an HTML table for email
body: <p>I am running a SQL query that returns a table of results. I want to send the table in an email using dbo.sp_send_dbMail.</p>
  
  <p>Is there a straightforward way within SQL to turn a table into an HTML table? Currently, I'm manually constructing it using COALESCE and putting the results into a varchar that I use as the emailBody. </p>
  
  <p>Is there a better way to do this?</p>