关于oracle varchar2类型请教高手

发布网友 发布时间:2022-04-25 18:16

我来回答

1个回答

热心网友 时间:2023-10-03 06:42

VARCHAR和VARCHAR2是一样的东西,都是可变长的(不会用空格填充的)
Varchar不推荐使用,Oracle公司以后可能会用Varchar做其他用途,但Varchar2肯定不会,Oracle公司做过保证

它们两个的定义如下:
VARCHAR
The VARCHAR datatype stores character strings of varying length. The first two bytes contain the length of the character string, and the remaining bytes contain the string. The specified length of the string in a bind or a define call must include the two length bytes, so the largest VARCHAR string that can be received or sent is 65533 bytes long, not 65535. For converting longer strings, use the LONG VARCHAR external datatype.

VARCHAR2
The VARCHAR2 datatype is a variable-length string of characters with a maximum length of 4000 bytes.

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com