Wednesday, April 7, 2010

Naming Conventions in SQL Server

Restrict the remaining characters in your identifiers to alphabetic characters (A–Z, a–z, and Unicode Standard 3.2 letters), numeric digits (0–9), and the underscore character (_). The dollar sign ($) character, while allowed, is not advisable.

• SQL Server variable names that start with the at sign (@),
• temporary tables and procedures that start with the number sign (#)
• global temporary tables and procedures that begin with the double number sign (##).
• Many built-in T-SQL functions and system variables have names that begin with a double at sign (@@),such as @@ERROR and @@IDENTITY.