Section II. Tutorial Overview

Transact SQL, often shortened to T-SQL, is Microsoft’s proprietary implementation of ANSI standard SQL. Transact SQL adds more power and programming functionality to ANSI SQL and is used exclusively with the SQL Server database management system.

Basic T-SQL shares many elements with ANSI SQL and we do not make a distinction in this tutorial.

One thing you need to understand is that SQL, especially Transact SQL, is a legit programming language. It is relatively simplistic compared to the likes of Python, but it is fairly powerful none the less, and you cannot afford to be a lazy programmer. Most of the concepts from computer science 101 will apply.

This tutorial is organized in three parts.

Language Basics

This section takes you through foundational T-SQL.

Advanced Topics

This section takes you into the heavier programming aspects of T-SQL. Here you will start to dive into issues of writing high performance code.

Solutions To Real World Problems

This is a highly opinionated section where I share my solutions to recurring problems that I have tackled over the past 20 years. Fortunately, all this stuff was kept in various forums, emails, and Stack Overflow in addition to the stuff I keep at the top of my head.

If you are brand new to T-SQL and SQL Server, much of this section may go over your head. That is ok. File it away for later.

This section is basically me uploading two decades of coding experience to the internet. I am not saying the way I do things is the correct way. I am saying that this is what I did and feel free to steal and adapt to your use case.

Last updated