开发者

Does vsize give the correct result for number?

When I create a table as

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

I inserted

eno as 111
ename as jon开发者_运维知识库e
sal as 2000

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

vsize(sal); returns 2.

Can you explain this?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜