标签:where objects lin 示例 record 语句 dba ref etc
declare
my_cur sys_refcursor; --定义游标变量,循环执行抓取锁的sql语句
type v_record is record( --定义 record类型
obj_id number,
obj_name varchar2(2000));
my_record v_record; --定义record变量
begin
open my_cur for ‘select object_id,object_name from dba_objects where object_id <20‘;
loop
fetch my_cur
into my_record;
exit when my_cur%notfound;
dbms_output.put_line(my_record.obj_id || chr(9) || my_record.obj_name);
end loop;
end;
标签:where objects lin 示例 record 语句 dba ref etc
原文地址:http://www.cnblogs.com/iyoume2008/p/6106832.html