patternsqlMinor
T-SQL Naming Standard
Viewed 0 times
sqlstandardnaming
Problem
Is there a recommended (official or not) style from Microsoft regarding naming and casing in T-SQL?
If there isn't one from Microsoft then is there one with broad acceptance?
If there isn't one from Microsoft then is there one with broad acceptance?
Solution
There's no broad standard that I've seen used or heard widely recommended. Some recommend prefixing tables with tbl but some are very against that. Some, like myself, prefer to name the ID column simply so you always know what the ID column of any table will be called ID while others, like my coworker, prefer to put the tablename (ie - serverid) so what it's called in another table matches the column name in the parent table.
The most important thing is that the scheme you use remains consistent, especially within the same database. Most DBAs can pick up on the naming format as long as it doesn't change within an environment.
The most important thing is that the scheme you use remains consistent, especially within the same database. Most DBAs can pick up on the naming format as long as it doesn't change within an environment.
Context
StackExchange Database Administrators Q#27086, answer score: 2
Revisions (0)
No revisions yet.