Introduction
Purpose
-
Describes the Application Development and Support Directorate's coding standard for writing T-SQL.
-
Demonstrates the importance of following good practice by quoting examples of working practices that have contributed to clinical incidents.
Scope
Software Developers have a responsibility to follow this guide.
- Developers not using T-SQL may need to adjust to their version of SQL or consider the need for a local coding standard.
Conventions
This section follows the handbook-wide conventions for RFC 2119 key words and callout boxes.
Redgate SQL Prompt
Indicates that this rule can be implemented using Redgate SQL Prompt
Further reading and information
Note Links to SQL Server content in Microsoft Learn© default to SQL Server 2022. Use its version selector to tailor the website for other versions.
The need for guidance
Use this standard to -
-
write code in a consistent way. So that those who read it may draw on previous experience to understand it more quickly.
-
produce software that is based on good practice, is maintainable, performant and secure.