开发者

Does vsize give the correct result for number?

开发者 https://www.devze.com 2022-12-24 19:08 出处:网络
When I create a table as Create Table e_det(eno Number, ename Varchar2(20), sal Number); I inserted eno as 111

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

精彩评论

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

关注公众号