易截截图软件、单文件、免安装、纯绿色、仅160KB

在oracle利用游标取数据库的结果集应用实例:

SQL> create table test2(s1 varchar(10),s2 varchar2(10));
表已创建。
SQL> insert into test2 values('11','111');
已创建 1 行。
SQL> insert into test2 values('22','222');
已创建 1 行。
SQL> CREATE OR REPLACE PACKAGE test222 AS
2 TYPE t_cursor IS REF CURSOR;
3 procedure p_test1( p_dd in out t_cursor);
4 end;
5 /
程序包已创建。
SQL> CREATE OR REPLACE package body test222 AS
2 procedure p_test1(
3 p_dd in out t_cursor)
4 is
5 begin
6 open p_dd for select * from test2;
7 end;
8 end;
9 /
程序包主体已创建。
SQL> var ss refcursor
SQL> exec test222.p_test1(:ss);
PL/SQL 过程已成功完成。
SQL> print ss
S1 S2
---------- ----------
11 111
22 222
SQL>


相关文档:

oracle wait event:PX Deq Credit: send blkd

Just a few days ago a got to two Oracle DBAs discussing why the have so much “PX Deq Credit : send blkd” on a system. And if that is causing their performance problems.
The are some blog on the internet claiming it has to do with qc distribution and what ever.
But in many cases, especi ......

suse系统下:oracle 从10.2.0.2 到 10.2.0.4 升级详解

oracle 从10.2.0.2 到 10.2.0.4 升级
一、下载升级包
下载地址:
ftp://updates.oracle.com/6810189/p6810189_10204_Linux-x86.zip
注意:不要用flashget下载,用迅雷下载。文件大小1G多。
二、关闭数据库
以oracle用户远程登录suse系统:
 1. sqlplus /nolog
 SQL> connect /as sysdba
 SQL> ......

oracle 权限


--使用DBA创建两个用户
create user gubo identified by gubo;
create user gubo2 identified by gubo;
--给两个用户连接权限
grant create session to gubo;
grant create session to gubo2;
--给其中一个用户访问表空间的权限
grant unlimited tablespace to gubo; 
--连接其中用户,创建表
--conn gubo ......

ORACLE 统计正负个数sql

select ss.*,
       sum(ss.aa) over (partition by ss.zsid order by ss.zsid) as fu,
       sum(ss.bb) over (partition by ss.zsid order by ss.zsid) as zheng
from
(
select m.zsid,
       sum(n.f0004_028n) ov ......

Oracle创建数据库同义词

1.在A用户下授权“商户信息表”给B用户
grant all on TBL_INF_MCHNT_INF to B;
commit;
2.在B用户下建立同义词
create synonym TBL_INF_MCHNT_INF for A.TBL_INF_MCHNT_INF;
3. 查询数据库所有同义词select * from sys.synonyms ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号