Hello everyone.
I need some help with a SELECT FROM WHERE query.
Let's say I have a row named A and another row named B, and I want to select the eventual cases where values from these two rows, somewhere, match eachother.
In this case, you can see, that the only value that you can find in the both rows is '1'. (Check the table below).
How can I make a SELECT statement out of this, where I want to sort out these occasions on when there are values of the same in the two rows?
SELECT * FROM table
WHERE a
= b
would not find anything, because as you can see in my example table below there are no occasions where a = b.
However, both row A and B have got a value of '1' somewhere, and THIS is what I want my query to find.
The '1' in row A is in the first line, and the '1' in row B is in the second line. Hope you understand what I'm asking for.
Thanks in advance!
Example Table:
A B
1 0
2 1
3 6
4 8
What I want as the result:
A B
1 1