删除重复记录,只保留一条

来源:互联网 发布:西安软件新城公交 编辑:程序博客网 时间:2024/04/27 18:39

第一种:

1.create table zqf_tmp3  as(Select distinct * from table);

2. Delete table;

3.insert into table as (select * from zqf_tmp3);

第二种

delete   from   维修   where   exists(select   1   from   维修 a   where     a.id>维修.id   and   维修.电话=a.电话 and soso)  (没试。呵呵 ) 

原创粉丝点击