Oracle PL / SQL Data Types

1, the following data types for digital data, which are variable length:
  • NUMBER

  Digital data, it can specify the precision and scale. Accuracy in the range of 1 to 38 decimal digits ranging from -84 to 127.

  •  FLOAT

  This is an ANSI data type, precision of 126 binary, decimal floating-point 38. Oracle also provides BINARY_FLOAT and BINARY_DOUBLE as an alternative.

  •  INTEGER

  Equivalent to NUMBER, zero decimal places.

 
2, the following data type for the date and time data, which are fixed length:
  •  DATE

  Its length is zero (as if empty) or 7 bytes. All data DATE contain century, year, month, day, hour, minute and second. Its effective range is 4712 BC January 1, 9999 to December 31.

  •  TIMESTAMP

  If empty, then its length is zero, or up to 11 bytes (depending on the precision specified). DATE with similar, but seconds, its accuracy up to 9, by default six.

  •  TIMESTAMP WITH TIMEZONE

  And TIMESTAMP same, but when you save the data can specify the time zone. The accuracy may reach a length of 13 bytes. The data type allows Oracle normalized time by two to determine the difference between them is UTC, even if the two times in different time zones.

  •  TIMESTAMP WITH LOCAL TIMEZONE

   And TIMESTAMP same, but when you save the data is normalized to the time zone database. When retrieved, it is normalized to select the time zone where its user process.

  •  INTERVAL YEAR TO MONTH

  For annual and monthly basis recording the time interval between two DATE or TIMESTAMP.

  • INTERVAL DAY TO SECOND

  Day for recording in units of seconds or a time interval between two DATE TIMESTAMP.

 
3, following a large object data types:
  •  CLOB

  Stored in the database character set data size does not limit: size (4GB-1) × database blocks.

  • NCLOB

  And CLOB same, but the data stored in the optional national language character set (it is one of the license Unicode character set).

  •  BLOB

  And CLOB same, but the binary data will not be Oracle Net perform character set conversion.

  • BFILE

  Locator that points to a file stored on the database server's operating system. File size limit is 2 64 -1, but the operating system may use other limits.

  • LONG

  Database character set data, the size of up to 2GB-1. LONG all the features of (or even more) provided by the CLOB, LONG can not be used in modern database, if the database has a column of this type should convert them to CLOB. In the table can have only one LONG column.

  •  LONG RAW

   And LONG same, but Oracle Net does not convert binary data. All LONG RAW columns should be converted to a BLOB.

 
4, the following is ROWID datatype:
  • ROWID

  In encoding the base 64 value, which is a position of the pointer pointing to table rows. It is encrypted. Inside it is a physical address. ROWID is Oracle proprietary data type, unless specifically choose otherwise invisible.

 

Note: Adapted from OCA / OCP certification exam guide the whole book.

Guess you like

Origin www.cnblogs.com/xiaozhupi/p/11334607.html