Flow Control
Learn to use flow control with conditional logic in T-SQL queries.
We'll cover the following...
T-SQL can be considered a programming language because we can add conditional logic to our T-SQL queries. In other words, T-SQL supports the IF
…ELSE
construct, like the majority of procedural programming languages.
Syntax
The IF
…ELSE
construct has this syntax in T-SQL: