日期:2014-05-17 浏览次数:21023 次
select sub.id, sub.value from
(with a as (select '1' as ID, '89' as value from dual
union all
select '1','92' from dual
union all
select '1','78' from dual
union all
select '2','96' from dual
union all
select '2','99' from dual
union all
select '3','72' from dual
union all
select '3','94' from dual
union all
select '4','88' from dual)
select id,value,row_number() over (partition by id order by id) cnt from a) sub
where sub.cnt = 1;