DF062: Column alias is specified without the AS keyword.

Last modified: June 12, 2025

The topic describes the DF062 T-SQL code analysis rule.

Category

DEPRECATED

Message

Column alias is specified without the AS keyword.

Description

Consider using the AS keyword to specify a column alias or add a possibly missing delimiter between column names.

Additional information

Specifying aliases with the AS keyword enhances the readability of SQL queries by providing descriptive names for columns or expressions in the result set. Additionally, adding delimiters between column names helps prevent potential syntax errors, especially in cases where column names contain spaces or special characters. By adopting these practices, you improve the clarity and maintainability of your SQL code, making it easier to understand and modify.

Noncompliant code example

SELECT c.object_id column_id
FROM sys.columns c

Compliant solution

SELECT c.object_id AS column_id
FROM sys.columns c