I found this solution on - http://stackoverflow.com/questions/5738240/mysql-subtract-a-table-from-another
To view all rows in A
except those in B
:
SELECT*FROM A
WHERE(field1, field2,..., fieldN)NOTIN(SELECT*FROM B
);
To actually delete from table A
the rows that are in B
:
DELETEFROM A
WHERE(field1, field2,..., fieldN)IN(SELECT*FROM B
);
5a790a08-9ba6-4c45-8f29-f38c099872c3|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
SQL
MySQL, Subtract Table