Click here to Skip to main content
13,139,082 members (63,819 online)
Click here to Skip to main content
Add your own
alternative version


34 bookmarked
Posted 21 Sep 2006

T-SQL Coding Standard

, 1 Oct 2008
Rate this:
Please Sign up or sign in to vote.
T-SQL Coding Standard - for programming the Microsoft SQL Server 2005 (DRAFT)


I am currently working on a T-SQL coding standard to formalize our work. Having been inspired by the IDesign C# Coding Standard, I made this T-SQL Coding Standard Document. Maybe this will have some value for the community. It is work in progress and I intend to update it as my experience with its implementation continues.

Unfortunately, I wrote the document in Word using loads of formatting and CodeProject's editor cannot display the document directly. Instead, I leave the document here in a zip for download.

When the document has matured some more, I will reformat it in HTML and modify this article.

Casper Leon Nielsen - 21. Sep 2006. (modified 1st October 2008)


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Casper Leon Nielsen
Architect HelloGroup
Denmark Denmark
Casper Leon Nielsen is a MCP/MCAD and is currently employed by HelloGroup a/s - a technical savy (yes that whats they are calling it these days) company.

You may also be interested in...


Comments and Discussions

Questiongood Pin
Hua Yujun1-Apr-13 21:16
memberHua Yujun1-Apr-13 21:16 
Questiongood Pin
Hua Yujun1-Apr-13 20:44
memberHua Yujun1-Apr-13 20:44 
Questiongood Pin
Hua Yujun1-Apr-13 20:44
memberHua Yujun1-Apr-13 20:44 
Questiongood Pin
Hua Yujun1-Apr-13 19:51
memberHua Yujun1-Apr-13 19:51 
GeneralNice Pin
ramakrishnankt22-Nov-11 20:22
memberramakrishnankt22-Nov-11 20:22 
QuestionAny Update? Pin
jhigaki9-Jul-08 6:06
memberjhigaki9-Jul-08 6:06 
AnswerRe: Any Update? Pin
Casper Leon Nielsen30-Sep-08 23:21
memberCasper Leon Nielsen30-Sep-08 23:21 
GeneralTable Naming - Statement Formatting Pin
Ahmed_Barakat31-Jan-08 6:16
memberAhmed_Barakat31-Jan-08 6:16 
GeneralRe: Table Naming - Statement Formatting Pin
Casper Leon Nielsen30-Sep-08 23:19
memberCasper Leon Nielsen30-Sep-08 23:19 
QuestionNOLOCK? Pin
Rhodesie28-Sep-06 6:33
memberRhodesie28-Sep-06 6:33 
AnswerRe: NOLOCK? Pin
Casper Leon Nielsen28-Sep-06 23:12
memberCasper Leon Nielsen28-Sep-06 23:12 
GeneralRe: NOLOCK? Pin
Casper Leon Nielsen29-Sep-06 0:29
memberCasper Leon Nielsen29-Sep-06 0:29 
GeneralRe: NOLOCK? Pin
Rhodesie1-Oct-06 22:59
memberRhodesie1-Oct-06 22:59 
Answerderived tables Pin
Casper Leon Nielsen28-Sep-06 23:15
memberCasper Leon Nielsen28-Sep-06 23:15 
GeneralDiscussion on joelonsoftware Pin
Casper Leon Nielsen24-Sep-06 10:50
memberCasper Leon Nielsen24-Sep-06 10:50 
Generalprefixing stored procedures with sp_ is bad practice Pin
KinStephen21-Sep-06 13:13
memberKinStephen21-Sep-06 13:13 
AnswerAnd the standard says you shouldnt Pin
Casper Leon Nielsen21-Sep-06 20:53
memberCasper Leon Nielsen21-Sep-06 20:53 
GeneralRe: And the standard says you shouldnt Pin
KinStephen22-Sep-06 7:21
memberKinStephen22-Sep-06 7:21 
AnswerConclusion [modified] Pin
Casper Leon Nielsen22-Sep-06 8:33
memberCasper Leon Nielsen22-Sep-06 8:33 
GeneralRe: Conclusion Pin
KinStephen22-Sep-06 11:28
memberKinStephen22-Sep-06 11:28 
Yes it is a matter of preference in styles... I was only trying to point out that clarity should be be considered more than it normally is. I get the feeling here that it isn't and sp was chosen simple because your used to it.

In addition... when I meant functions and stored procedures are the same, I should have clarified that and what I meant to say is reguardless how how they behave in SQL Server, they are still prodecures and functions 'stored' on SQL Server.
GeneralWhy not... Pin
Colin Angus Mackay21-Sep-06 3:41
memberColin Angus Mackay21-Sep-06 3:41 
AnswerRe: Why not... Pin
Casper Leon Nielsen21-Sep-06 3:57
memberCasper Leon Nielsen21-Sep-06 3:57 
GeneralAvoid using the blob type - NOT Pin
__alias21-Sep-06 3:24
member__alias21-Sep-06 3:24 
QuestionRe: Avoid using the blob type - NOT Pin
Casper Leon Nielsen21-Sep-06 3:34
memberCasper Leon Nielsen21-Sep-06 3:34 
AnswerRe: Avoid using the blob type - NOT Pin
__alias21-Sep-06 10:14
member__alias21-Sep-06 10:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170915.1 | Last Updated 1 Oct 2008
Article Copyright 2006 by Casper Leon Nielsen
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid