The topic describes the DF056 T-SQL code analysis rule.
Deprecated
Three- or four-part column name is used in a query.
It is recommended to use the standard-compliant two-part column names. To reference a column, only the table name or alias is necessary.
Following this rule enhances code readability and reduces ambiguity, making it easier to understand and maintain SQL queries. Additionally, adhering to standard-compliant naming conventions ensures compatibility across different database systems and minimizes potential issues when migrating or sharing code between platforms. By consistently using two-part column names, you promote consistency and clarity in your SQL code, leading to improved maintainability and ease of understanding for developers and administrators.
SELECT sales.Customer.AccountNumber AS CustomerName
FROM sales.Customer
GO
SELECT c.AccountNumber AS CustomerName
FROM sales.Customer c
GO