|
|
Naming conventions and suggestions for MSSQL
Musts
- Never prefix your own stored procedures with SP_.
- They are / should be reserved for System Procedures stored in the MASTER database.
- Your own SP_ procedures will somewhat start slower than any other name, because MSSQL will first search for that procedure in the MASTER database.
- When executing a stored procedure always prefix it with the stored procedure owner, usually [dbo]. If not, MSSQL will first look for the procedure for the currently logged on user.
Preferences
- Separate the component names with _. ie: abc_xzy_update
- Include the name of the primary table in the procedure's name. ie: abc_sales03_update
- End the procedure's name with the action performed by the procedure. ie: _select, _insert, _update...
- No need to prefix the stored procedure with sp_ or proc_. Almost all DBA tools separate Sprocs, Views, Functions, and Tables.
|
|