implicit-alias
What it does
Section titled “What it does”Reports a table or column alias written without the AS keyword.
Why it matters
Section titled “Why it matters”The alias of a column is easy to confuse with a missing comma: select a b from t is one column named b, and select a, b from t is two. AS makes it explicit.
To fix, write AS before the alias.
Example
Section titled “Example”...select a from t left join u on t.a = u.a;...select a b, c as d from t u join v as w on u.a = w.a;...Configuration
Section titled “Configuration”sql: lint: rules: implicit-alias: warn # off (default), warn, errorEnabled by the presets: sql/sqlfluff.
Suppress one line with sudsy-disable-next-line implicit-alias in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| sqlfluff | AL01 |
full |
| sqlfluff | AL02 |
full |