Number size? [message #62664] |
Sun, 08 August 2004 06:39 |
Gil
Messages: 1 Registered: August 2004
|
Junior Member |
|
|
Is it important that number columns when creating tables, are created to exactly the space needed for the column?
An example :
create table testtable (
testcol1 number(20,8),
testcol2 number(12,2),
testcol3 number(7));
Is testcol1 using more space than testcol2? Is testcol2 using more space than testcol3? If I only store numbers that are number(12,2) in testcol1, am I wasting space?
|
|
|
Re: Number size? [message #62686 is a reply to message #62664] |
Mon, 09 August 2004 10:55 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
No, number (x,y) is a varying length datatype just like number or number(x). The extra info is used to limit the range of values which the column will store. Number is not varying in the same way that varchar2 is. 1, 10, 10000000 all use the same storege space.
-- (bytes)
select vsize(1) from dual;
2
select vsize(10000000000000000) from dual;
2
select vsize(112312.12332432) from dual;
8
|
|
|