Skip to content

Duplicate Column Names in SQL Query Results Not Displayed #10

@urixiti

Description

@urixiti

When executing a SQL query that returns two or more columns with the same name (e.g., name from both employee and department), the interface only displays one of the columns. The other column is omitted or hidden from the result set.

This behavior occurs when columns with identical names are included in the query’s result set. The user would expect both columns to appear, but due to the name collision, only one is visible. I use Safari as test browser.

Steps to Reproduce:

  1. Run a SQL query that selects two columns with the same name from different tables, such as: SELECT employee.name, department.name FROM employee, department;
  2. Observe that only one name column appears in the result set.

Workaround:
Explicitly rename the clashing columns in the SQL query to ensure both are displayed, for example:
SELECT employee.name AS employee_name, department.name AS department_name FROM employee, department;

Suggested Fix:
Modify the query result rendering logic to handle duplicate column names, possibly by auto-renaming or providing a visual distinction between columns with the same name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions