up
解决方案 »
- 急急急急急急急急急!如何实现向数据库提交一张表单,让数据库批量查询
- 触发器无法删除?
- 多表查询Sql语句
- 小弟百拜求救解决方法
- [Oracle]急求:如何用VS2005远程连接局域网中的oracle
- oracle 9i os验证
- 加分!!请教关于ORACLE表锁定的问题!谢谢 !!!
- rank() over()函數是如何使用的?
- 请问SQL问题:如何实现类似的功能select field1 as fi,field2 as f2,f1*f2 from A;谢谢
- oracle imp 导入中提示错误
- 关于树形结构表的建立与使用
- ORA-04031: unable to allocate 4200 bytes of shared memory
create or replace function fun_test return number as
p_out number:=1;
v_temp number;
cursor c is select * from 表名;
begin
open c ;
loop
fetch c into v_temp;
exit when c%notfound;
p_out:=p_out*v_temp;
end loop;
close c;
return p_out;
exception
when others then
return -99;
end
cursor c is select nvl(字段,1) from 表名;
假如有table x有兩個欄位f1,f2,三行數據
-------
f1 f2
-------
a 1
a 2
a 3
SELECT F1, COUNT(F2) FROM X GROUP BY F1
結果為 a,3
-----------------------------------------
SELECT F1, SUM(F2) FROM X GROUP BY F1
結果為 a, 6
-----------------------------------------
-----我想得到 a, 123 該怎麼辦????????
-----------------------------------------