Select Union Query problem
- by Krishma
I have 2 tables
Table A
id name
------------
1 Scott
2 Dan
3 Sam
Table B
id name
------------
1 Dan
2 Andi
3 Jess
Result needs to be
Id Name Found
1 Scott A
2 Dan C i.e. found in both
3 Sam A
2 Andi B
3 Jess B
I am able to do UNION to fetch the result but how i generate column Founds. Any idea ?? Thank you in advance :)