Although T-SQL is not a general-purpose programming language, it does support programming constructs such as variables and conditional processing. Because these will be used in the next few lessons, this lesson introduces these T-SQL programming concepts.
All of the SQL statements used thus far have been single standalone statements—
SELECT statements to retrieve data,
ALTER TABLE statements to make table changes, and so on. But some data-retrieval tasks are more complex, often involving multiple statements, conditional processing, and mid-process data manipulation.
T-SQL is not a general-purpose programming language, but it does support some basic programming ideas and constructs ...