SQL

SQL

Made by DeepSource

Inconsistent references SQL-L028

Style
Minor

References should be consistent in statements with a single table.

You can configure this in the [analyzers.meta] section of the .deepsource.toml vonfiguration file. Allowed values are: qualified, unqualified, consistent (default is consistent)

Bad practice

In this example, only the field b is referenced.

SELECT
    a,
    foo.b
FROM foo

Recommended

Remove all the reference or reference all the fields.

SELECT
    a,
    b
FROM foo

-- Also good

SELECT
    foo.a,
    foo.b
FROM foo