PhpStorm 2024.1 Help

Code Inspection: 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.

Suppress an inspection in the editor

  1. Place the caret at the highlighted line and press Alt+Enter or click the Intention action icon.

  2. Click the arrow next to the inspection you want to suppress and select the necessary suppress action.

Last modified: 17 April 2024