以下语句的前提是ID为主键(不重复)的情况下select max(id),pid,fid,cname,state,redate,tnamefrom table group by pid,fid,cname,state,redate,tname如果只需要PID相同的去掉一项,可改为 select * from table where id in (select max(id) as id group by pid)