Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Column Names in SQL Query Results Not Displayed #10

Open
urixiti opened this issue Oct 16, 2024 · 0 comments
Open

Duplicate Column Names in SQL Query Results Not Displayed #10

urixiti opened this issue Oct 16, 2024 · 0 comments

Comments

@urixiti
Copy link

urixiti commented Oct 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant