BINARY INTEGER

From Oracle FAQ
Jump to: navigation, search

BINARY_INTEGER is a PL/SQL data type used for storing signed integers. BINARY_INTEGER is defined in the STANDARD package as a subtype of INTEGER. Variables declared as BINARY_INTEGER can be assigned values between -2**31 to 2**31-1 (-2,147,483,648 to 2,147,483,647).

History[edit]

Before Oracle 9i Release 2, BINARY_INTEGER was the only indexing data type allowed for associative arrays (index-by tables). However, starting from Oracle 10g, PLS_INTEGER and BINARY_INTEGER are identical and can be used interchangeably.

Examples[edit]

DECLARE
  TYPE my_array_t IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;
  ...

Also see[edit]

Glossary of Terms
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #