Rob Caron

Developer-related topics and other stuff.

Prefixing Stored Procedure Names with "sp_"

Prefixing Stored Procedure Names with "sp_"

  • Comments 1

Scott Dockendorf has a post (SQLServer: Why to NOT use “sp_” to name your stored procedures) about this topic with a link to an article from Brian Moran (Should I Use the sp_ Prefix for Procedure Names?).

Brian’s article gives a much better explanation of why you shouldn’t do this than I covered in my first MSDN article at Microsoft (Coding Techniques and Programming Practices) in which I wrote:

Do not prefix stored procedures with sp_, because this prefix is reserved for identifying system-stored procedures.

I think you’ll agree that Brian covered this much better than I did.

The date on my article is February 2000, but as I recall the original version was published in 1999 (as mentioned in an earlier post, Code Complete, Second Edition Now Available). I even included some of it in the documentation for Visual Studio .NET 2002 & 2003 (Coding Techniques and Programming Practices), which I think we’ve since dropped for Visual Studio 2005. It’s probably time to get it dropped from the MSDN Library, too.

I’m interested in hearing from anyone that found that article useful. It was rated by 350+ people with an average rating of 8 out of 9, so it couldn’t have been that bad.

  • Mike Chaliy поднял интересную тему относительно именования объектов базы данных. В ней несколько раз

Page 1 of 1 (1 items)
Leave a Comment
  • Please add 6 and 3 and type the answer here:
  • Post