您的位置:首页 > 数据库 > Oracle

oracle record and table 无需初始化

2012-03-20 17:53 218 查看
declare

r_rec sys_refcursor;

type rec_def is record (

id varchar2(10)

);

type array_def is table of rec_def INDEX BY BINARY_INTEGER;

recordVar rec_def;

tableVar array_def;

BEGin

null;

recordVar.id:='1';

--DBMS_OUTPUT.PUT_LINE(r_rec.id);

tableVar(1) := recordvar;

end;

不过table是可以初始化的:

tableVar :=array_def();但是要先创建l全局类型array_def;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: