去除表中某个字段重复的值,只保留一个 select * from tablename where id in (select min(id) from tablename group by userid);