Oracle 自定义结构(Record) 记录
来源:互联网 发布:淘宝网店上架宝贝 编辑:程序博客网 时间:2024/06/03 19:18
1、概念及使用
类似于C中的自定义类型,可用于定义某表的字段集合。
定义格式 type recordName is Record(
字段名称 字段类型,
字段名称 字段类型
);
使用步骤: 1)声明结构体 2)定义结构体变量 3)使用。
2、例:
--在匿名块中使用record,也可定义在过程、函数、包中。
declare
--声明结构体
type re_stu is record(
rname student.name%type, --中间用逗号分开
rage student.age%type --最后一个字段没有符号
); --以分号结束
--定义结构体变量
rw_stu re_stu;
cursor c_stu is select name,age from student;
begin
open c_stu;
loop
fetch c_stu into rw_stu; --使用结构体变量
exit when c_stu%notfound;
dbms_output.put_line('姓名='||rw_stu.rname||' 年龄='||rw_stu.rage);
end loop;
close c_stu;
end;
0 0
- Oracle 自定义结构(Record) 记录
- Oracle 自定义结构(Record)
- Oracle系列:记录Record
- Oracle系列:记录Record
- Oracle中的记录(Record)
- Oracle中的记录(Record)
- oracle记录Record的运用
- oracle:PL/SQL record记录
- oracle 记录集变量RECORD
- Delphi : record 记录类型 - 结构指针
- Delphi : record 记录类型 - 结构指针
- Oracle中的记录(Record)的使用
- Oracle自定义类型 Record + PL/SQL表
- 记录 record
- delphi 用record结构读取记录文件的问题
- oracle record
- oracle record
- ORACLE RECORD
- Qt入门-提示、警告、错误、询问、关于对话框
- python_2
- 集合框架(增加,删除,判断元素以及迭代器)
- java序列化与反序列化
- 银联支付-手机网页支付接口开发
- Oracle 自定义结构(Record) 记录
- UI_容器视图控制器
- 数据库之 触发器 基础
- 对matlab中colormap的解释及fill、imshow的用法说明
- 调度策略 http://book.2cto.com/201302/16285.html
- Java——Frame框架
- LeetCode:House Robber
- c头文件(.h)的作用
- Python/scikit-learn机器学习库(决策树)