PL / SQL和SQL中VARCHAR2的最大大小

前端之家收集整理的这篇文章主要介绍了PL / SQL和SQL中VARCHAR2的最大大小前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在Oracle 10g上.在一个要求中,我需要增加一个pl / sql varchar2变量的大小.它已经在4000尺寸.我读过“在PL / sql中,VARCHAR2可以达到32767字节,对于sql,限制是4000字节”

我可以增加这个变量的大小,而不用担心sql限制?

解决方法

见官方文件( http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements001.htm#i54330)

Variable-length character string having maximum length size bytes or characters. Maximum size is 4000 bytes or characters,and minimum is 1 byte or 1 character. You must specify size for VARCHAR2.
BYTE indicates that the column will have byte length semantics; CHAR indicates that the column will have character semantics.

但在Oracle Databast 12c中可能是32767(http://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF30020)

Variable-length character string having maximum length size bytes or characters. You must specify size for VARCHAR2. Minimum size is 1 byte or 1 character. Maximum size is: 32767 bytes or characters if MAX_STRING_SIZE = EXTENDED 4000 bytes or characters if MAX_STRING_SIZE = STANDARD

猜你在找的MsSQL相关文章