- 5
- 0
- 约1.92万字
- 约 24页
- 2017-06-05 发布于河南
- 举报
全面探讨PLSQL的数据类型(全)(国外英文资料)
全面探讨PLSQL的数据类型(全)
PL/SQL has two composite data structures: records and collections. Records are composed of different domains, and collections consist of different elements. In this article we will discuss the types of records and collections, how to define and use records and collections.
PL/SQL record
Record is a complex data structure, PL/SQL scalar data types, and other data types is simply to predefined at the package level, but a composite data type must be defined before use, record it is called a compound data type because he by domain that composed of data elements of logical groups. Domain can be a scalar data types or other record types, it is similar to the structure of the c language, records can be as the data rows in the table, the domain is equivalent to the column in the table, the table and virtual table (a view or query) is very easy to define and use, and each column in the row or record or domain can be reference or assignment alone, can also be referenced by a separate statement records all of the domain. There may also be parameters in the stored procedure or function.
Create record
There are two definitions in PL/SQL: explicit definition and implicit definition. Once the record is defined, declare or create a record variable that defines the type, and then use the variable. Implicit statement is based on the table structure or to use the % TYPE attribute query, implicitly declared is a more powerful tool, this is because the variables are dynamically created data.
Explicit definition record
The explicit definition record is defined in the declaration section before creating a record variable in the PL/SQL block. Use the type command to define the record and then create the variable for that record. Syntax is as follows:
TYPE record_type IS RECORD (field_definition_list);
Field_definition_list is a comma-separated list.
The syntax for the domain definition is as follows:
Field_name data_type_and_size [NOT NULL] [{: = DEFAULT} default_value]
D
您可能关注的文档
最近下载
- 桥面系人行道施工方案.docx VIP
- 深川CHINSC S200系列通用矢量变频器说明书.pdf VIP
- (高清版)B-T 230.2-2022 金属材料 洛氏硬度试验 第2部分:硬度计及压头的检验与校准.pdf VIP
- 2024部编版初中历史八年纪上全册重点知识点归纳总结(复习必背).docx VIP
- 2025年招标师信息化与系统集成项目招标方案设计专题试卷及解析.pdf VIP
- 美妆直播间布置方案.docx VIP
- 2025年课件-(已瘦身)大学生创新创业基础(创新创业课程)PPT完整全套教学课件-新版.pptx
- 辽宁省建设工程系列专业技术资格评审标准.pdf VIP
- 2025年10月自考14444小学教师专业发展.试题及答案.pdf VIP
- 七下历史教学计划.docx VIP
原创力文档

文档评论(0)