distinct关键字用在整个记录行上。
select distinct a,b from (select 'a' a, 'b' b from dualunion allselect 'a' a, 'b' b from dual) t