Forum Moderators: open
I have 2 tables in a database. Lets call them Table A (a table of usernames) and Table B (a table of transactions carried out by these usernames).
Over time some usernames have been deleted from Table A, but we did not remove their transactions from Table B. So we have Table B which has loads of transactions which no longer have corresponding users in Table A.
I want to identify and probably delete these orphan transactions! So tried "SELECT * FROM B, A WHERE B.username not like A.username"... and phpMyAdmin just hangs up with that :-(
Any ideas?! Do I need a JOIN of some sort? :-)
References:
[dev.mysql.com...]
[en.wikipedia.org...]
[dev.mysql.com...]