Using Naming Conventions

As a developer, I am sure that you have found that for almost everything, someone somewhere has established naming conventions for how things are described. When dealing with SQL Server, no one has decided what the naming standards for objects in the database are. Naming conventions allow you to write code that is self documenting and, hence, easier to read.

Microsoft Discrepancies in Naming Convention

Looking at some of Microsoft's code, you will find that even Microsoft does not use a standard naming convention. Take a look at the code snippets in Listings 4.3 and 4.4 from the sp_help and sp_rename system stored procedures, respectively.

Code Listing 4.3. Old sp_help
 create proc sp_help @objname nvarchar(776) = NULL ...

Get Writing Stored Procedures for Microsoft SQL Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.