解决方案 »
- 求Oracle9i SQL排行语句
- 如何用透明网关连接MYsql啊
- oracle的全表扫描为啥这么慢呢?是否信春哥,有这么重要吗?
- ORACLE初级资料
- 视图中查询大量数据表现太慢如何优化(关键字段已建索引),高手指点下。。。
- 复杂SQL查询语句
- oracle的udump目录下生成很大体积的文件,怎么回事?
- ORA-01562: failed to extend rollback segment number 0 ,help!
- 关于solaris下的oracle数据库连接问题
- access表的数据倒入oracle?
- oracle 表里面的数据存储转行了,怎么用SQL把它转换成一行存储
- 根据B表更新A表
from (select distinct t.id, 1 seq
from test5 t
union all
select t1.id, 2 seq
from (select t.id,
row_number() over(partition by t.id order by t.id) rn
from test5 t) t1
where t1.rn > 1
order by seq, id) t;
select 1 aa from dual
union all select 2 from dual
union all select 3 from dual
union all select 5 from dual
union all select 6 from dual
union all select 7 from dual
union all select 3 from dual
union all select 4 from dual
union all select 4 from dual
union all select 5 from dual
union all select 3 from dual
)
select aa
from (select aa, count(1) bb
from t
group by aa)
connect by bb - level >= 0
group by level, aa
order by level, aa;
不知道还有没有用