I have table A and table B and they are both joined through a relationship. table B has a foreign key of table A's key. Table A is joined when the program runs because it is dynamic and could reside in any database. How would I find all the rows in table B that are no longer found in table A?
For ex.
Starting out we have
table A table B
4 4
3 3
5 5
later that evening
table A deleted some rows
table A table B
NULL 4
3 3
NULL 5
I want to get the keys 4,5 so that I can tell what was deleted.