Code Inspection: Redundant alias expressions
Configure inspections: Settings | Editor | Inspections
Show intention actions: AltEnter
Reports alias expressions that duplicate names of columns in tables and might be redundant.
Example (PostgreSQL):
CREATE TABLE foo(a INT, b INT);
SELECT * FROM foo foo(a, b);
SELECT * FROM foo foo(a);
SELECT * FROM foo foo(x);
SELECT * FROM foo foo(x, y);
The first two aliases use the same column names as in the foo
table. They are considered redundant because they column names are identical.
Place the caret at the highlighted line and press AltEnter or click
.
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.