select name,ip from 表名 group by name,ip
GROUP BY name, ip或者GROUP BY name + ip
select columns from table where ip = 'strIP' and name ='strName' order by ip;select columns from table where ip = 'strIP' and name ='strName' order by name;