Click here to Skip to main content
Click here to Skip to main content

T-SQL Coding Standard

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

Introduction

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)

License

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

Share

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.

Comments and Discussions

 
Questiongood PinmemberHua Yujun1-Apr-13 22:16 
Questiongood PinmemberHua Yujun1-Apr-13 21:44 
Questiongood PinmemberHua Yujun1-Apr-13 21:44 
Questiongood PinmemberHua Yujun1-Apr-13 20:51 
GeneralNice Pinmemberramakrishnankt22-Nov-11 21:22 
QuestionAny Update? Pinmemberjhigaki9-Jul-08 7:06 
AnswerRe: Any Update? PinmemberCasper Leon Nielsen1-Oct-08 0:21 
GeneralTable Naming - Statement Formatting PinmemberAhmed_Barakat31-Jan-08 7:16 
GeneralRe: Table Naming - Statement Formatting PinmemberCasper Leon Nielsen1-Oct-08 0:19 
QuestionNOLOCK? PinmemberRhodesie28-Sep-06 7:33 
AnswerRe: NOLOCK? PinmemberCasper Leon Nielsen29-Sep-06 0:12 
GeneralRe: NOLOCK? PinmemberCasper Leon Nielsen29-Sep-06 1:29 
GeneralRe: NOLOCK? PinmemberRhodesie1-Oct-06 23:59 
Answerderived tables PinmemberCasper Leon Nielsen29-Sep-06 0:15 
GeneralDiscussion on joelonsoftware PinmemberCasper Leon Nielsen24-Sep-06 11:50 
Generalprefixing stored procedures with sp_ is bad practice PinmemberKinStephen21-Sep-06 14:13 
Your coding standard says to prefix all stored procedures with "sp_". There is numerous article recommding this is bad practice as SQL Server will scan for system stored procedures prefixed with sp and then look for your stored procedure (this is an optimization issue). It would be best if you prefixed the stored procedure with something such as "usp_".
 

AnswerAnd the standard says you shouldnt PinmemberCasper Leon Nielsen21-Sep-06 21:53 
GeneralRe: And the standard says you shouldnt PinmemberKinStephen22-Sep-06 8:21 
AnswerConclusion [modified] PinmemberCasper Leon Nielsen22-Sep-06 9:33 
GeneralRe: Conclusion PinmemberKinStephen22-Sep-06 12:28 
GeneralWhy not... PinmemberColin Angus Mackay21-Sep-06 4:41 
AnswerRe: Why not... PinmemberCasper Leon Nielsen21-Sep-06 4:57 
GeneralAvoid using the blob type - NOT Pinmember__alias21-Sep-06 4:24 
QuestionRe: Avoid using the blob type - NOT PinmemberCasper Leon Nielsen21-Sep-06 4:34 
AnswerRe: Avoid using the blob type - NOT Pinmember__alias21-Sep-06 11:14 
GeneralRe: Avoid using the blob type - NOT PinmemberCasper Leon Nielsen22-Sep-06 0:53 
GeneralRe: Avoid using the blob type - NOT PinmemberCasper Leon Nielsen22-Sep-06 1:38 
GeneralRe: Avoid using the blob type - NOT Pinmember__alias22-Sep-06 3:28 

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

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

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