Inspectopedia 2024.3 Help

Duplicating column name in SELECT

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.

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

SqlDuplicateColumn
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | SQL

Last modified: 03 December 2024