1
Leave a Reply

Please Login to comment
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
blitz Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
blitz
Admin
blitz

Tabla con duplicados por email:
PARA UPDATE
update USUARIOS
inner join (
select max(id) as lastId, email
from USUARIOS
group by email
having count(*) > 1) duplic on duplic.email = USUARIOS.email
SET log= 0
where USUARIOS.id < duplic.lastId PARA DELETE: delete from USUARIOS where id not in ( select max(id) from USUARIOS group by email)