I am developing an application in VB.net 2005 that synchronizes two mysql databases of same structure. I have done most of the work but having problem in finding the difference in records in 2 tables. Let me explain the scenario
There is a table in the local database having name "user". The same table exists in the online version of the database. I want to find the difference of records in the 2 tables so that i can delete surplus users from the online version of the database. I am trying something like this, which is not working
I can't afford to select all the records and then find the difference betwen the 2 tables
There is a table in the local database having name "user". The same table exists in the online version of the database. I want to find the difference of records in the 2 tables so that i can delete surplus users from the online version of the database. I am trying something like this, which is not working
Code:
DELETE FROM localdb.user WHERE userid NOT IN ( SELECT group_concat( userid SEPARATOR ',' ) FROM onlinedb.user ) LIMIT 0 , 30
I can't afford to select all the records and then find the difference betwen the 2 tables
Comment