I have two tables and I want to update a field of want table based on the presence of the ID's in the other table.
Table A has the following records:
Table B has the following records:
I want to update col2 in table B with 'Y' based on the occurence of the ID's in table A. In this case, col2 of ID1,ID2, and ID3 in table B should be marked with 'Y' after the update.
How do I do this with a single SQL update statement?