I have a question about running a particular type of query.
Here’s the example: I have 2 tables X and Y
Table X
1@abc.com
2@abc.com
3@abc.com
I now want to move EVERYTHING into table Y.
So now, Table Y looks just like Table X
I now delete everything from Table X, except for 1@abc.com
So the new Table X looks like this:
Table X
1@abc.com
Let’s say that I did this accidentally and I now want to move everything from Table Y back into X except for matching records (which, in this case, would 1@abc.com)
How would I go about this?
Something close to the below ought to do it. Watch for NULLs, though – you’ll need to ensure that the conditions on the LEFT JOIN cope with these.