SQL: What does NULL as ColumnName imply

Aliasing can be used in a number of ways, not just to shorten a long column name.

In this case, your example means you're returning a column that always contains NULL, and it's alias/column name is aColumn.

Aliasing can also be used when you're using computed values, such as Column1 + Column2 AS Column3.


In the statement result we have a column that has all NULL values. We can refer to that column using alias.

In your case the query selects all records from table, and each result record has additional column containing only NULL values. If we want to refer to this result set and to additional column in other place in the future, we should use alias.


When unioning or joining datasets using a 'Null AS [ColumnA] is a quick way to make sure create a complete dataset that can then be updated later and a new column does not need to be created in any of the source tables.