全面探讨PLSQL的数据类型(全)(国外英文资料).docVIP

  • 5
  • 0
  • 约1.92万字
  • 约 24页
  • 2017-06-05 发布于河南
  • 举报

全面探讨PLSQL的数据类型(全)(国外英文资料).doc

全面探讨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

文档评论(0)

1亿VIP精品文档

相关文档