SQL comment header examples

davidsleeps picture davidsleeps · Jul 6, 2009 · Viewed 99.7k times · Source

Would just like too see what peoples Stored Procedure/Function etc comment headers look like (so post your examples)...I've only really seen what the SQL Server Management Studio creates but am interested in what other peoples look like...the formatting, characters used, procedure information/details etc I guess are what really makes them different...

SQL Server Management Studio (version 9) stored procedure comment header default:

-- =============================================
-- Author:      Name
-- Create date: 
-- Description: 
-- =============================================

Answer

Convict picture Convict · Jul 6, 2009
--
-- STORED PROCEDURE
--     Name of stored procedure.
--
-- DESCRIPTION
--     Business description of the stored procedure's functionality.
--
-- PARAMETERS
--     @InputParameter1
--         * Description of @InputParameter1 and how it is used.
--
-- RETURN VALUE
--         0 - No Error.
--     -1000 - Description of cause of non-zero return value.
--
-- PROGRAMMING NOTES
--     Gotchas and other notes for your fellow programmer.
--
-- CHANGE HISTORY
--     05 May 2009 - Who
--        * More comprehensive description of the change than that included with the
--          source code commit message.
--