Best practice For T-Sql Syntax
-
Monday, February 06, 2012 5:26 PM
Are there any books or articles that discuss best practices for T-Sql syntax and proper T-Sql commenting.
I'm looking for soemthing to help me syntax and commenting within the T-Sql code.
Right now I use StyleCop and Resharper for C#/VS2010 but I don't know of anything for Sql.
chuckdawit
All Replies
-
Monday, February 06, 2012 5:37 PM
Hi,
here are two articles which discuss best practices:
- http://www.sql-server-performance.com/2001/sql-best-practices/
- http://www.databasejournal.com/features/mssql/article.php/3827091/T-SQL-Best-Practices.htm
Best Regards. Please Mark Answered, If my solution solves your problem.- Proposed As Answer by Naomi NMicrosoft Community Contributor Monday, February 06, 2012 7:11 PM
-
Monday, February 06, 2012 7:09 PM
The following page has helpful links to articles on the given subject:
It also has a link to a free, online sql code formatter (beautifier).
Most of the SQL code is self-documenting. It only requires documentation on anything which are not obvious to a (different) database developer.
Example for stored procedure header comment:
http://www.sqlusa.com/bestpractices/stored-procedure-documentation/
Kalman Toth SQL SERVER 2012 & BI TRAINING
New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012- Edited by Kalman TothMicrosoft Community Contributor Monday, February 06, 2012 7:34 PM
- Marked As Answer by witdaj Monday, February 06, 2012 11:12 PM
- Edited by Kalman TothMicrosoft Community Contributor Saturday, October 06, 2012 9:08 PM

