还有一个就是直接联表查询,
比如select a,id,b.id from a,b where a.filed1=b.filed1 and a.filed2=b.filed2 and a.filed3=b.filed3
这样查询然后删除了 ------解决方案-------------------- 1、取得 表A 的记录数备用 select count(*) as cnt from A
2、提取出与表A不同的表B的记录 select * from A union select * from B limit cnt
3、取得 表B 的记录数备用 select count(*) as cnt from B
4、提取出与表B不同的表A的记录 select * from B union select * from A limit cnt
然后把你想要的结果做一份范本出来 ------解决方案-------------------- 你应该给出测试数据 ------解决方案-------------------- select a,id,b.id from a,b where a.filed1=b.filed1 and a.filed2=b.filed2 and a.filed3=b.filed3
然后再删除吧
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn