I need a SQL query that compares two values and returns an ID.
I have this table:
ID Calling_ID Called_ID
1 27 10
2 15 20
3 80 90
4 90 88
5 60 30
6 88 40
7 15 60
8 30 40
9 27 95
10 40 30
How do I check if each value in the Calling_ID
column exists in the Called_ID
column and then return the ID? The above data would return 88, 30, 40.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…