Mysql一些复杂的sql语句(查询与删除重复的行)

时间:2020-12-16 10:26:57
【文件属性】:
文件名称:Mysql一些复杂的sql语句(查询与删除重复的行)
文件大小:31KB
文件格式:PDF
更新时间:2020-12-16 10:26:57
mysql mysql update语句 1.查找重复的行 SELECT * FROM blog_user_relation a WHERE (a.account_instance_id,a.follow_account_instance_id) IN (SELECT account_instance_id,follow_account_instance_id FROM blog_user_relation GROUP BY account_instance_id, follow_account_instance_id HAVING COUNT(*) > 1) 2.删除重复的行(保留一条) PS:因为mysql的delete,如果

网友评论