Code Inspection: Duplicating column name in SELECT
Configure inspections: Settings | Editor | Inspections
Show intention actions: AltEnter
Reports duplicated names of column aliases in SELECT lists.
Example (Sybase ASE):
CREATE TABLE t1 (a TEXT, b INT, c INT);
SELECT a AS x, b AS x FROM t1;
The x
alias name is used for a
and b
columns. These assignments are highlighted as errors because you cannot use identical alias names for columns in Sybase ASE.
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.