读书人

关于mysql中distinct的用法?解决方案

发布时间: 2013-11-20 12:46:02 作者: rapoo

关于mysql中distinct的用法?
在使用distinct时,如需要返回两个或者多个字段时,需要注意? mysql
[解决办法]
哦,这个都一样的,

比如一个字段:

select distinct xxx from tb

如果是2个字段:

select distinct xxx,yyy from tb
[解决办法]
顶楼上
select distinct xxx,yyy from tb。
如果两条记录的XXX,YYY完全相等时才会被去重

读书人网 >SQL Server

热点推荐