Reusing an Alias in a SQL SELECT Statement - CTE Explained - Temp Table Alternative (MSSQL)

Опубликовано: 17 Июль 2026
на канале: SysAdmin Tools Com
134
5

Have you ever wanted to reuse an ALIAS in a MSSQL SELECT clause, but found no easy help online. I believe this simple example will allow you to do this and explain CTE in the easiest way possible.

Using a CTE WITH clause allows you to create one selection to create aliases and then use those aliases in a second select statement to do additional calculations.

This is an alternative to using a temp table in some scenarios.