mysqldump --skip-comments --skip-extended-insert -u root -p database1>file1.sql
mysqldump --skip-comments --skip-extended-insert -u root -p database2>file2.sql
diff file1.sql file2.sql
其实还有一些比较工具,推荐一个
mysql-comparison-tools
select t1.*, t2.*from 真实表 t1 full join 临时表 using (id) //using也可写成on t1.id=t2.id
where t1.f!=t2.f or (t1.f is null and t2.f is not null) or (t1.f is not null and t2.f is null)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)