tags:

views:

51

answers:

1

When I create a table as

Create Table e_det(eno Number, ename Varchar2(20), sal Number);

I inserted

eno as 111
ename as jone
sal as 2000

vsize(ename) returns 4 because name is 4 characters.

vsize(sal); returns 2.

Can you explain this?

+3  A: 

From the documentation:

VSIZE returns the number of bytes in the internal representation of expr.

If you want the number of characters instead, try

Length( To_Char( sal ) )

instead.

Peter Lang
If you do `select dump(2000) from dual;`, you see the two bytes are 194 and 21
Gary