- 刪除b表中與a表不同的記錄
- delete from b where not exists(select * from a where a.id=b.id and a.name=b.name)
- delete from b where b.id not in (select a.id from a) or b.name not in (select a.name from a)
delete from v9_photo_data where not exists(select * from v9_photo where v9_photo.id=v9_photo_data.id)
delete from v9_material_data where not exists(select * from v9_material where v9_material.id=v9_material_data.id)