• Great post. A minor point.
    If you are using VCS, TFS, or some code repository this makes sense:
     -- uspLogError logs error information in the ErrorLog table about the
     -- These notes will NOT get persisted with the object
     -- and will NOT be available to future developers scripting this object from  SSMS
     ALTER PROCEDURE [dbo].[uspLogError]
         @ErrorLogID [int] = 0 OUTPUT -- contains the ErrorLogID of the row inserted
     AS                               -- by uspLogError in the ErrorLog table
     BEGIN
         SET NOCOUNT ON;
      etc...
     END
    Problem is, quite often a developer will enherit a system, and the code reporsitory may or may not be available.
    When that happens, you might use SSMS to script the object, in order to get ther "source" code of the objects.
    In your example, those notes that come BEFORE the ALTER\CREATE statement are lost. They never got saved when the original object got created.
    If you include all notes AFTER the ALTER\CREATE statement, they get persisted with the object, and would be available to a future developer scripting out those objects.
     ALTER PROCEDURE [dbo].[uspLogError]
         @ErrorLogID [int] = 0 OUTPUT -- contains the ErrorLogID of the row inserted
     AS                               -- by uspLogError in the ErrorLog table
     -- uspLogError logs error information in the ErrorLog table about the
     -- These notes will get persisted with the object
     -- and will be available if this object gets scripted out in SSMS in the future
     BEGIN
         SET NOCOUNT ON;
      etc...
     END
    In Summary:
    Always write all notes for an object AFTER the ALTER\CREATE statement.