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

Applying a filter to a column affects all result sets containing a column with that name #18514

Open
Benjin opened this issue Dec 16, 2024 · 0 comments

Comments

@Benjin
Copy link
Contributor

Benjin commented Dec 16, 2024

Repro:

  1. Create two tables that have a shared column name, and insert data:
CREATE TABLE FirstTable (name nvarchar(50))
INSERT INTO FirstTable values ('Albert')
INSERT INTO FirstTable values ('Benjamin')

CREATE TABLE SecondTable (name nvarchar(50))
INSERT INTO SecondTable values ('Benjamin')
INSERT INTO SecondTable values ('Charlie')
  1. Select from both tables:
SELECT * FROM FirstTable
SELECT * FROM SecondTable
  1. Apply a filter on the name column of the first result set

Expected:

  • only the first result set's values are filtered

Reality:

  • the name column is filtered in both result sets
20241216-2125-54.5891116.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants