There are times where you need to write a single T-SQL statement that is able to return different T-SQL expressions based on the evaluation of another expression. When you need this kind of functionality you can use the CASE expression or IIF function to meet this requirement. In this Stairway level Gregory Larsen reviews the CASE and IIF syntax and showing you examples of how the CASE expression and IIF function.
2016-04-20 (first published: 2014-04-09)
There are times when retrieving data for complex business requirement requires you to temporarily store one or more results sets for a short period of time. Typically these temporary tables are stored in the scope of the current connection, but they may also need to be available across multiple connections.
2016-03-18 (first published: 2014-04-02)
In this level of the Beyond the T-SQL Basics stairway, we will be discussing the different aspects of a subquery.
2016-01-01 (first published: 2014-01-29)
The first topic in this stairway will be discussing the TOP clause. The TOP clause allows you to control the number of rows to be returned or affected by a query.
2015-11-20 (first published: 2014-01-15)