Get started with Transact-SQL programming

Advanced
Data Analyst
Data Engineer
Data Scientist
Database Administrator
Developer
Solution Architect
Student
Azure SQL Database
Azure SQL Managed Instance
SQL Server on Azure Virtual Machines
Azure SQL Server on Virtual Machines
SQL Server

Transact-SQL (T-SQL) provides a robust programming language with features that let you temporarily store values in variables, apply conditional execution of commands, pass parameters to stored procedures, and control the flow of your programs.

Learning objectives

After completing this module, you'll be able to:

  • Describe the language elements of T-SQL used for simple programming tasks.
  • Describe batches and how they're handled by SQL Server.
  • Declare and assign variables and synonyms.
  • Use IF and WHILE blocks to control program flow.

Prerequisites

Before starting this module, you should have experience of using Transact-SQL SELECT queries to retrieve and filter data from a table in a database.