sql :两个字段,决定一个唯一值,如果利用这两个字段分组?

2024-12-28 14:44:32
推荐回答(3个)
回答1:

select name,ip from 表名 group by name,ip

回答2:

GROUP BY
name, ip

或者
GROUP BY
name + ip

回答3:

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;