Home > SSW Standards > DeveloperSQLServer > SSW SQL Server Object Naming Standard
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 
By Steve Jones on SQL Server Central
SQL Server Coding Standards - Part 2 - Formatting 
By Steve Jones on SQL Server Central
Acknowledgments
Adam Cogan