- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我继承了一些代码,这些代码将成为一些额外工作的基础。查看存储过程,我看到了很多关联数组。
其中一些由 binary_integers 索引,一些由 pls_integers 索引。两者之间有什么区别吗?
我看了the documentation ,但除了这一行:
The PL/SQL data types
PLS_INTEGER
andBINARY_INTEGER
are identical. For simplicity, this document uses PLS_INTEGER to mean bothPLS_INTEGER
andBINARY_INTEGER
.
最佳答案
历史原因。他们used to be different before 10g :
On 8i and 9i, PLS_INTEGER was noticeably faster than BINARY_INTEGER.
When it comes to declaring and manipulating integers, Oracle offers lots of options, including:
INTEGER - defined in the STANDARD package as a subtype of NUMBER, this datatype is implemented in a completely platform-independent fashion, which means that anything you do with NUMBER or INTEGER variables should work the same regardless of the hardware on which the database is installed.
BINARY_INTEGER - defined in the STANDARD package as a subtype of INTEGER. Variables declared as BINARY_INTEGER can be assigned values between -231+1 .. 231-1, aka -2,147,483,647 to 2,147,483,647. Prior to Oracle9i Database Release 2, BINARY_INTEGER was the only indexing datatype allowed for associative arrays (aka, index-by tables), as in:
TYPE my_array_t IS TABLE OF VARCHAR2(100)
INDEX BY BINARY_INTEGER
PLS_INTEGER - defined in the STANDARD package as a subtype of BINARY_INTEGER. Variables declared as PLS_INTEGER can be assigned values between -231+1 .. 231-1, aka -2,147,483,647 to 2,147,483,647. PLS_INTEGER operations use machine arithmetic, so they are generally faster than NUMBER and INTEGER operations. Also, prior to Oracle Database 10g, they are faster than BINARY_INTEGER. In Oracle Database 10g, however, BINARY_INTEGER and PLS_INTEGER are now identical and can be used interchangeably.
关于oracle - pls_integer 和 binary_integer 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7412731/
我继承了一些代码,这些代码将成为一些额外工作的基础。查看存储过程,我看到了很多关联数组。 其中一些由 binary_integers 索引,一些由 pls_integers 索引。两者之间有什么区别吗
Java 中与 PL/SQL 数据类型 BINARY_INTEGER 等价的数据类型是什么? 最佳答案 根据 the Oracle documentation ,我们可以将其映射到 oracle.sq
friend , 这个问题与这个 one.有关 Steven Feuerstein 在他的书 PL/SQL Programming 中写道,他不建议将 BINARY_INTEGER 用于新工作,除非它
Java 中 IS TABLE OF NUMBER(5) INDEX BY BINARY_INTEGER 的类型是什么? OracleTypes.ARRAY 给出 ORA-03115 异常。 更新:全
我是一名优秀的程序员,十分优秀!