what is the difference between binary_integer and
pls_integer
Answers were Sorted based on User's Feedback
Answer / mkumar.it
Both binary_integer and pls_integer are almost same at front
end, however internal working logic are different. Both are
signed integer. For better performance, use pls_integer as
it uses machine arithmatic whereas binary_integer uses
library arithmatic. Other than this, if calculation
overflows the in pls_integer, it throws exception but
binary_integer does not.
Is This Answer Correct ? | 35 Yes | 7 No |
The difference is :
PLS_INTEGER and BINARY_INTEGER have the same magnitude
range, they are not fully compatible. When a PLS_INTEGER
calculation overflows, an exception is raised. However,
when a BINARY_INTEGER calculation overflows, no exception
is raised if the result is assigned to a NUMBER variable.
Also, PLS_INTEGER operations use machine arithmetic, so
they are faster than NUMBER and BINARY_INTEGER operations,
which use library arithmetic.
In new applications, always use PLS_INTEGER for better
performance.
Is This Answer Correct ? | 15 Yes | 11 No |
Why do we need a foreign key?
how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba
what is the use of HASH, LIST partitions?
Differentiate between pl/sql and sql?
what is timestamp in mysql? : Sql dba
What is ttitle and btitle?
what is mean by forward declaration and where we'll use it.
What are stuff and replace function?
What is indexing oracle sql?
What does the acronym acid stand for in database management?
How many joins in sql?
Does execute immediate commit?