oracle复合数据类型学习五——pl/sql记录
2014-10-30 11:30
816 查看
--如何使用复合数据类型 --一、pl/sql记录 --1、在select into中自定义pl/sql记录 declare -- 自定义记录变量类型 type comtype_record_type is record( id communitytype.community_type_id%type, name communitytype.name%type ); --自定义变量 comtype_record comtype_record_type; begin select ct.community_type_id,ct.name into comtype_record from communitytype ct where ct.community_type_id = 'ebook'; dbms_output.put_line(comtype_record.name); end; --2、在select into中自定义pl/sql记录 declare -- 自定义记录变量类型 type comtype_record_type is record( id communitytype.community_type_id%type, name communitytype.name%type ); --自定义变量 comtype_record comtype_record_type; begin select ct.community_type_id,ct.name into comtype_record.id,comtype_record.name from communitytype ct where ct.community_type_id = 'ebook'; dbms_output.put_line(comtype_record.name); end; --2、在insert中自定义pl/sql记录 declare comtype_record communitytype%type; begin comtype_record.community_type_id:='wlcb'; comtype_record.name:='网络出版'; from communitytype ct insert into communitytype values comtype_record; --或者insert into communitytype(community_type_id,name) --values (comtype_record.community_type_id,comtype_record.name); end;
相关文章推荐
- Oracle 10g复合数据类型pl/sql集合学习六——索引表、嵌套表、变长数组
- Oracle 学习:PL/SQL循序渐进全面学习教程--课程十三 使用组合数据类型* 游标操纵数据
- oracle pl/sql之sql中的复合变量之记录类型
- PL/SQL复合数据类型(集合与记录)
- pl/sql复合数据类型_pl/sql记录类型
- Oracle PL/SQL复合数据类型
- PL/SQL学习(复合数据类型与游标)
- JAVA_WEB Oracle 10g学习:PL/SQL数据类型
- PL/SQL_使用复合数据类型1(PL/SQL记录)
- 使用复合数据类型——PL/SQL记录
- Oracle PL/SQL 程序设计读书笔记 - 第11章 记录类型
- PL/SQL复合数据类型
- PL/SQL-2 复合数据类型
- 解决从pl/sql查看oracle的number(19)类型数据为科学计数法的问题
- PL/SQL复合数据类型—record,集合(索引表,嵌套表,VARRAY)—之四
- 2012年1月3日 星期二(oracle读书笔记,PL/SQL语言概述、块结构、数据类型)
- Oracle中的pl/sql编程的数据类型
- 学习操作oracle.sql.Blob数据类型,向数据库插入Blob数据类型的数据
- PL/SQL-2 复合数据类型
- PL/SQL编程复合数据类型之PL/SQL记录