DF056: Three- or four-part column name is used in a query.

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

Category

Deprecated

Message

Three- or four-part column name is used in a query.

Description

It is recommended to use the standard-compliant two-part column names. To reference a column, only the table name or alias is necessary.

Additional information

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.

Noncompliant code example

SELECT sales.Customer.AccountNumber AS CustomerName
FROM sales.Customer
GO

Compliant solution

SELECT c.AccountNumber AS CustomerName
FROM sales.Customer c
GO

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?