[size=small]record
1.定义:
TYPE name_rectype IS RECORD(
name1 VARCHAR2(15)
,name2 VARCHAR2(30)
,name3 VARCHAR2(30));
2.使用record
直接使用,如:name_rectype.name1
3.给record赋值
[list]
[1] name_rectype.name1 := varSome;
[/list]
[list]
[2] select name1,name2,name3
into name_rectype
from table
where key...
[/list]
[list]
[3] fetch recCur into name_rectype
或者
fetch recCur2 into name_rectype.name1
[/list]
[list]
[4] name_rectype := name_rectype2
[/list]
[/size]
参考:http://www.unix.org.ua/orelly/oracle/langpkt/ch01_11.html
1.定义:
TYPE name_rectype IS RECORD(
name1 VARCHAR2(15)
,name2 VARCHAR2(30)
,name3 VARCHAR2(30));
2.使用record
直接使用,如:name_rectype.name1
3.给record赋值
[list]
[1] name_rectype.name1 := varSome;
[/list]
[list]
[2] select name1,name2,name3
into name_rectype
from table
where key...
[/list]
[list]
[3] fetch recCur into name_rectype
或者
fetch recCur2 into name_rectype.name1
[/list]
[list]
[4] name_rectype := name_rectype2
[/list]
[/size]
参考:http://www.unix.org.ua/orelly/oracle/langpkt/ch01_11.html