SELECT * from (SELECT *, CONCAT(UserID,CompanyId) as uc from newuserauthority) t WHERE t.uc in
(
SELECT uc from (SELECT CONCAT(UserID,CompanyId) as uc from newuserauthority) tt GROUP BY uc HAVING count(uc) > 1
);
表中数据根据多字段去重
猜你喜欢
转载自www.cnblogs.com/lovemj/p/9337170.html
今日推荐
周排行