<form id="hz9zz"></form>
  • <form id="hz9zz"></form>

      <nobr id="hz9zz"></nobr>

      <form id="hz9zz"></form>

    1. 明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

      Mysql刪除重復的數據的方法

      [摘要]這篇文章主要介紹了Mysql刪除重復的數據 Mysql數據去重復,需要的朋友可以參考下MySQL數據庫中查詢重復數據select * from employee group by emp_name having count (*)>1;Mysql 查詢可以刪除的重復數據select t1....
      這篇文章主要介紹了Mysql刪除重復的數據 Mysql數據去重復,需要的朋友可以參考下

      MySQL數據庫查詢重復數據

      select * from employee group by emp_name having count (*)>1;

      Mysql 查詢可以刪除的重復數據

      select t1.* from employee t1 where (t1.emp_name) in (select t4.emp_name from (select t2.emp_name from employee t2 group by t2.emp_name having count(*)>1) t4) and t1.emp_id not in (select t5.emp_id from (select min(t3.emp_id) as emp_id from employee t3 group by t3.emp_name having count(*)>1) t5);

      Mysql 刪除重復的數據

      delete t1 from employee t1 where (t1.emp_name) in (select t4.emp_name from (select t2.emp_name from employee t2 group by t2.emp_name having count(*)>1) t4) and t1.emp_id not in (select t5.emp_id from (select min(t3.emp_id) as emp_id from employee t3 group by t3.emp_name having count(*)>1) t5);

      以上就是Mysql刪除重復的數據的方法的詳細內容,更多請關注php中文網其它相關文章!


      學習教程快速掌握從入門到精通的SQL知識。




      日韩精品一区二区三区高清