Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> storing a one byte number ( 0..255 )
hi all.
query:
create table test ( a smallint, b raw(1) )
insert into test values ( 1, hextoraw('1') ) insert into test values ( 255, hextoraw('ff') ) select rawtohex(a), dump(a, 16), a, rawtohex(b), dump(b, 16), b from test
result:
RAWTOHEX(A) DUMP(A,16) A RAWTOHEX(B) DUMP(B,16) B
am i _compact_ store number with a small value? 3 bytes for number in 0 ... 255 range is a very expensive :(
WBR, Dmitry Received on Thu Apr 01 2004 - 07:01:58 CST