The topic describes the DF062 T-SQL code analysis rule.
DEPRECATED
Column alias is specified without the AS
keyword.
Consider using the AS
keyword to specify a column alias or add a possibly missing delimiter between column names.
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.
SELECT c.object_id column_id
FROM sys.columns c
SELECT c.object_id AS column_id
FROM sys.columns c