mysql根据某个字段去重

INSTR于sqlserver 的charindex参数相反

GROUP BY  分组去重

SELECT ugrid, ugid,userid,username,face,ctid FROM ct_usergrouprelation where   INSTR(strsql,ugid)>0   GROUP BY userid

posted @ 2017-03-31 11:09  逝者永生  阅读(14266)  评论(0编辑  收藏  举报