title: How can I automatically prepend comment blocks to SQL Server stored procedures?
body: <p>In my organization, the standard is to comment all stored procedures with a comment block that looks like this:</p>
  
  <pre><code>/*-- =============================================
  -- Created by: Chris McCall
  -- Created date: 08.05.2009
  -- Purpose: Inserts new setting value, code and description
  -- Modifications:
  -- &lt;Date&gt; &lt;Programmer&gt; &lt;Change&gt;
  -- =============================================*/
  </code></pre>
  
  <p>I don't find this to be particularly useful, since the stored procedure is named <code>usp_utl_CustomSettingsInsert</code> anyway, and the comments are not guaranteed to be accurate. I usually ignore these blocks unless I have a problem and need to contact the original developer (who has long since departed, cackling maniacally, in a helicopter).</p>
  
  <p>However, it's not up to me, so I have to do this. Is there any way, with a trigger or some other SQL Server magic, to create these comment blocks with nothing more than the power of my <em>mind</em>?</p>