数据库处理语句-----不断更新中....

1-查找数据库中相同的记录

select   a,b,c,d   from   tablename   group   by   a,b,c,d   having   count(*)>1

 联合主键

 select * from mb_member where membername+','+mobilephone+','+cerno in (
 select max(membername+','+mobilephone+','+cerno) from mb_member
 group by mobilephone
 having count(*)>1
 )

2-删除数据库中相同的记录:

delete from table A where A.rowid < (select max(B.rowid) from table B where A.a = B.a)

3.

你可能感兴趣的:(table,delete,select)