1.

What are the types of Datatypes in PL/SQL?

Answer»

The types of Datatypes are categorized as the following:

1. Scalar DATA Type

The Data Types that have SINGLE values with no internal components. Here are the predefined Scalar Data Types with the description about its data:

  • Numeric: Numeric values. It includes the following sub-types: PLS_INTEGER, BINARY_INTEGER, BINARY_FLOAT, BINARY_DOUBLE, DOUBLE PRECISION, FLOAT, INT, INTEGER, SMALLINT, REAL, etc.
  • CHARACTER: Single characters or strings of characters. It includes the following sub-types: CHAR, VARCHAR2, NCHAR, NVARCHAR2, LONG, LONG RAW, ROWID, UROWID, etc.
  • Boolean: Logical values
  • Datetime: Date and Time
  • Interval: Time Interval

2. Composite Data Type

Data items that have internal components that can be accessed individually

3. Reference Data Type

Pointers to other data items

4. Large Object Data Types (LOB)

These Data Types are pointers to large objects that are stored separately from other data items, like text, graphic images, video clips, etc. The following are the data types:

  • BFILE: STORE large binary objects in operating system files outside the database. The size is system-dependent and exceed 4 GB.
  • BLOB: Store large binary objects in the database. The size is 8 to 128 TB.
  • CLOB: Store large blocks of character data in the database. The size is 8 to 128 TB.
  • NCLOB: Store large blocks of NCHAR data in the database. The size is 8 to 128 TB.


Discussion

No Comment Found