日期:2014-05-17 浏览次数:20983 次
select m.a, m.b, m.c, m.d
from (select a,
b,
c,
d,
concat(c, d) r,
lag(concat(d, c), 1, null) over(order by a) re
from t) m
where m.r <> m.re
or m.re is null
A B C D
---------- -- - -
1 ab a q
3 ab e d
5 pd n m
7 pd v b
9 cd f h
with t as(
select 1 A,'ab' B,'a' C,'q' D from dual