17,089
社区成员
发帖
与我相关
我的任务
分享
--少写了表名:
select t.a,t.b,t.c from
(select a,
b,
c,
count(rownum) rn over (partition by b,c group by b,c)
from table_test) t
where t.rn>1;
select a, b, c
from (select a,
b,
c,
row_number() over(partition by b, c order by rowid) rn
from tablename)
where rn > 1;
select t.a,t.b,t.c from
(select a,
b,
c,
count(rownum) rn over (partition by b,c group by b,c)) t
where t.rn>1;
select t.a,t.b,t.c from (select a,b,c,rownum rn from Table_test order by a) t where t.rn<=2;
select a.* from tableA a,tableA b where a.b=b.b and a.c=b.c and a.a<>b.a
select * from tableA where b=c and a<>b;