Skip Navigation LinksHome > SSW Standards > DeveloperSQLServer > SSW SQL Server Object Naming Standard

There was an error displaying the testimonials. Please report this error to SSW and include the following text:
- Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

 

Do you agree with them all? Are we missing some? Let us know what you think.

SQL Server Object Naming Standard

This standard outlines the standard on naming objects within SQL Server. Use these standards when naming any object or if you find an older object that doesn't follow these standards within SSW.

All feedback is welcome. Thanks to all who gave feedback. A special thanks to Andy Baron.

Syntax

Object
Prefix
Example
Table
--
Client
Column
--
ClientID
Temporary Table
_zt
_ztClient
System Table
_zs
_zsDataVersion
_zsVersionLatest
View
vw, gv_
vwClientWithNoPhoneW
gv_ClientWithNoPhoneW
Stored Procedure
proc, gp_
procSelectClientClientID
gp_SelectClientClientID
Trigger
trg
trgOrderIU
Default*
dft *
dftToday *
Rule
rul
rulCheckZIP
User-Defined Datatype
udt
udtPhone
User-Defined Functions
udf
udfDueDates

* We never use defaults as objects, this is really an old thing that is just there for backwards compatibility. Much better to use a default constraint.

Other Links

SQL Server Coding Standards - Part 1 You are about to leave the SSW Site
By Steve Jones on SQL Server Central

SQL Server Coding Standards - Part 2 - Formatting You are about to leave the SSW Site
By Steve Jones on SQL Server Central

Acknowledgments

Adam Cogan