SSW SQL Server Object Naming Standard http://www.ssw.com.au/ssw/Standards/DeveloperSQLServer/SQLSer...
SSW SQL Server Object Naming Standard
Home > SSW Standards > DeveloperSQLServer > SSW SQL Server Object Naming Standard
I've been putting together Development Guidelines for my employer and in the process have reviewed many
published standards (in the .Net arena) from around the world. In each category, the suggestions at SSW are
always among the best.
- Leon Bambrick,
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
_zsDataVersion
System Table _zs
_zsVersionLatest
vwClientWithNoPhoneW
View vw, gv_
gv_ClientWithNoPhoneW
procSelectClientClientID
Stored Procedure proc, gp_
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
1 of 1 8/12/2011 10:27 AM