Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> efficient (in size) integer datatype?
What would be the most efficient (in terms of minimizing storage
space) of using INTEGER, SMALL_INT, NUMBER(3), BINARY_INTEGER, or
NATURAL for a variable which can have values in the 0 to 255 range?
I would have thought SMALL_INT, but a table in the Oracle PL/SQL Programming book by Steven Feuerstein/O'Reilly says that SMALL_INT is stored internally as NUMBER(38) (same as INT or INTEGER), which makes me wonder if the # of bytes to store a SMALL_INT is actually quite large (to handle the max. of 38 digits of precision).
Thanks for any insights!
Paul
--
* * * * * * * * * * * * * * * *
![]() |
![]() |