去重复的sql(Oracle)
1.利用group by 去重复
2.可以利用下面的sql去重复,如下
1) select id,name,sex from (select a.*,row_number() over(partition by a.id,a.set order by name) su from test a ) where su=1
2)select id,name,sex from (select a.*,row_number() over(partition by a.id,a.sex order by name) su from test a) where su>1