Let's say I have table A and table B.
A has 5 columns: F, G, H, I and X.
B has 1 column: X.
X has the same kind of values in both A and B.
Say I run the following.
SELECT *
FROM A
LEFT JOIN B
ON A.X = B.X
The resulting data set has 6 columns. Sometimes, however, because of the LEFT JOIN, the data in the row from table B is NULL.
How to return * from A but to have an extra (sixth) column in the result set that shows 'Yes' if the join did find a match and 'No' if it didn't?