mysql删除重复数据

    xiaoxiao2021-03-25  110

    create table tmptable as select min(id) as tmp from target_table group by userId; delete from target_table where id not in (select tmp from tmptable); 查询user_id数量大于1的数据信息 select *,count(user_id) from da_bank_base_user where is_valid = 1 group by user_id having count(user_id)>1;
    转载请注明原文地址: https://ju.6miu.com/read-15045.html

    最新回复(0)