欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Oracle刪除重復(fù)的數(shù)據(jù),Oracle數(shù)據(jù)去重復(fù)

 更新時間:2016年08月25日 23:43:02   投稿:mdxy-dxy  
這篇文章主要介紹了Oracle刪除重復(fù)的數(shù)據(jù),Oracle數(shù)據(jù)去重復(fù),需要的朋友可以參考下

Oracle  數(shù)據(jù)庫中查詢重復(fù)數(shù)據(jù):

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

 Oracle  查詢可以刪除的重復(fù)數(shù)據(jù)

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

Oracle 刪除重復(fù)數(shù)據(jù)

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

相關(guān)文章

最新評論