Try this self join:
SELECT DISTINCT t.b
FROM your_table t
INNER JOIN your_table s
ON t.b = s.c
AND t.id <> s.id
Question
I need to find matching values in two columns in same table, but with different rows.
what i want is value 3 is in both columns
Please Help!
Solution
Try this self join:
SELECT DISTINCT t.b
FROM your_table t
INNER JOIN your_table s
ON t.b = s.c
AND t.id <> s.id