MySQL Query : Difference between tables
Hi Folks! :)
I need to find the difference between two tables with a MySQL query.
What I'm trying to do is locate the records in table1 that don't exist in table2.
SELECT DISTINCT(table1.userid) as USER from table1
INNER JOIN table2 ON table2.userid = table1.userid
WHERE table1.userid <> table2.userid
ORDER by table1.userid ASC
The above isn't working. What am I missing?