Wise Owl coding standards for T-SQL (the SQL dialect used in SQL Server)
Part one of a three-part series of blogs

A blog setting out an approach to coding in SQL to ensure consistently high standards across your organisation.

  1. Coding standards for writing SQL in Management Studio (this blog)
  2. Coding conventions for selecting data in SQL
  3. Coding conventions for programming in SQL

Posted by Andy Brown on 01 February 2017

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Coding standards for writing SQL in Management Studio

Life is easier if everyone uses the same conventions!

Example: you're only able to read this because a) you understand English and b) you use an Internet browser which interprets the near-universal markup language HTML.

The aim of this blog is to lay down sensible guidelines for how to write SQL, so that everyone in your organisation can speak the same language in the same way!  I've divided the blog into two parts:

Part Notes
Selecting data How to write queries to select data from tables (broadly corresponding with our introduction to SQL course).
Programming in SQL How to write stored procedures, CTEs and other more advanced SQL programming constructs (broadly corresponding with our advanced SQL course).

You can download and run this script if you want to try out any of the example queries yourself (they're based on a simple database of 459 momentous events in history).

  1. Coding standards for writing SQL in Management Studio (this blog)
  2. Coding conventions for selecting data in SQL
  3. Coding conventions for programming in SQL
This blog has 0 threads Add post