首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

sql 剔除重复的记录

2012-10-24 
sql删除重复的记录 (3)也是通过rowid,但效率更高。  SQLdelete from employee where rowid not in (  sele

sql 删除重复的记录

 (3)也是通过rowid,但效率更高。  SQL>delete from employee where rowid not in (  select max(t1.rowid) from employee t1 group by t1.emp_id,t1.emp_name,t1.salary);--这里用min(rowid)也可以。  EMP_ID EMP_NAME SALARY  1 sunshine 10000  3 xyz 30000  2 semon 20000 

热点排行
Bad Request.