0712-2888027 189-8648-0214
微信公众号

孝感风信网络科技有限公司微信公众号

当前位置:主页 > 技术支持 > MySQL > SQL删除b表中与a表不同的记录

SQL删除b表中与a表不同的记录

时间:2024-04-25来源:风信官网 点击: 516次
  1. 删除b表中与a表不同的记录
  2. delete from b where not exists(select * from a where a.id=b.id and a.name=b.name)
  3. 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)

热门关键词: SQL 删除b表 a表 不同记录
栏目列表
推荐内容
热点内容
展开