Data Types in PL/SQL

Source: Internet
Author: User

1. scalar data type (basic data type): a variable of this data type has only one value and has no internal component. It includes numeric, numeric, datetime, Boolean, for example, (varchar (2), number (P, S )).

2. attribute data type: A. % rowtype: reference a row in the database table as the data type, record type (record type), you can use ". "To access the attributes in the record, for example, myemp Scott. EMP % rowtype; the user must have the permission for this table. B. % Type: reference the type of a column in the table as the Data Type of the variable. You can also reference the type of a variable as the Data Type of the new variable. For example: Sal Scott. EMP. Sal % type: the type of the Sal column in the EMP table, or mysal number: = 3; totalsal mysal % type; the new variable total is the type of the variable mysal.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.