SQL

SQL

Made by DeepSource

Unidiomatic use of UNION operator SQL-L033

Style
Minor

UNION [DISTINCT|ALL] is preferred over just UNION, because explicit is better than implicit.

Bad practice

SELECT a, b FROM table_1
UNION
SELECT a, b FROM table_2

Recommended

SELECT a, b FROM table_1
UNION DISTINCT
SELECT a, b FROM table_2