Two columns of a select list have the same alias

tx0/sql:duplicate-select-aliasrecommendedwarningreliability/logicdepth fastbug

What it finds

Two columns of a select list with the same alias: whoever reads the result by name gets one of them, and a view or derived table with them is rejected.

From the rule's source, duplicate_select_alias.rs.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:duplicate-select-alias" = "warning"

To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.

tx0 explain tx0/sql:duplicate-select-alias shows the same in the terminal. Found a false positive? Report it.