Reputation: 6969
Exists any naming guideline for naming columns at Sql Server? I searched at MSDN, but dont found anything, just for .Net
Upvotes: 1
Views: 302
Reputation: 3159
I find the following short list helpful:
sp_
" since SQL Server uses the "sp_" prefix to denote special meaning for system procedures.Upvotes: 1
Reputation: 53024
There are lots of different conventions out there (and I'm sure other answers may make some specific suggestions) but I think that the most important thing is that you be consistent. If you are going to use a prefix for something, use it everywhere. If you are going to have a foreign key to another table, use the same column name everywhere. If you are going to separate words with underscores, do that everywhere.
In other words, if someone looks at a few tables, they should be able to extrapolate out and guess the names of other tables and columns. It will require less mental processing to remember what things are called.
Upvotes: 3
Reputation: 63136
There are many resources out there, but nothing that I have been able to truly pin down as a SQL Server specific set or anything published by Microsoft.
However, I really like this list.
Also, very important to NOT start out stored procedures with sp_
To be 100% honest though, the first part of my posted link is the most important. It must make sense for your organization, application, and implementation.
Upvotes: 1