您的位置:积木首页 >> 数据库频道 >> MS_SQL >> 正文:
标题:在SQL中删除重复记录(多种方法)
时间:2005-8-23 来源:不详 浏览数:
from employee;

    EMP_ID EMP_NAME                                     SALARY

---------- ---------------------------------------- ----------

         1 sunshine                                      10000

         2 semon                                         20000

         3 xyz                                             30000

SQL>  select * from employee group by emp_id,emp_name,salary having count (*)>1

    EMP_ID EMP_NAME                                     SALARY

---------- ---------------------------------------- ----------

         1 sunshine                                      10000

         2 semon                                          20000


SQL>
select * from employee e1

where rowid in (select max(rowid) from employe e2
 

上一页  [1] [2] [3] [4] [5] [6] [7] [8] 下一页


(责任编辑:欣欣裴)
最近更新
今日推荐
热点文章