你可以建一个统计function,然后用以下方式调用:
select id,name,fun_sum(id) from table_name;
即可.
select id,name,fun_sum(id) from table_name;
即可.
解决方案 »
- oracle 能隐藏数据吗
- oracle10g安装后的中文乱码问题
- rac IMP备份1466错误
- 权限不够?怎么回事啊?
- 一个问题,在线等,。。。。急...............
- 请教如何在Oracle中设定编码类型或长度(百分求助)
- 如何使用C#上传图片到ORACLE中,然后在需要的时候取出呢?谢谢(目前只有这么多分分勒,有了再加)
- 请教!oracle8.0不想安装Jserver,在何处选择,我在选择组件画面中没有找到?
- Oracle数据库读写问题?
- exadata可以初始化安装12c吗?
- oracle: select a,b from xxtable 记录有5千万条,结果会怎样?
- 重发:如何完成这两个操作(共200分)
break on id dup
break on name dup
from
(select id,'' id_null,'' name_null,0+null sum_null,subno,subnum
from tab t1
where exists(select 1 from tab where id=t1.id and subno<t1.subno)
union all
select id,id id_null,max(name) name_null,sum(subnum) sum_null,min(subno) subno,
(select subnum from tab where id=t2.id and subno=t2.subno)subnum
from tab t2
group by id)t3
order by id,subno;