PL/SQL 和 SQL 中 VARCHAR2 的最大大小是多少?
我使用的是 Oracle 10g.在要求中,我需要增加 pl/sql VARCHAR2 变量的大小.它已经是 4000 大小.我已阅读那
I am on Oracle 10g. In a requirement I need to increase the size of a pl/sql VARCHAR2 variable. It is already at 4000 size. I have read that
在 PL/SQL 中,VARCHAR2 可以达到 32767 字节.对于 SQL,限制是4000 字节
in PL/SQL, VARCHAR2 can be up to 32767 bytes. For SQL the limit is 4000 bytes
我可以增加这个变量的大小而不用担心 SQL 限制吗?
Can I increase the size of this variable without worrying about the SQL limit?
推荐答案
查看官方文档(http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements001.htm#i54330)
具有最大长度大小字节或字符的可变长度字符串.最大大小为 4000 个字节或字符,最小为 1 个字节或 1 个字符.您必须为 VARCHAR2 指定大小.BYTE 表示该列将具有字节长度语义;CHAR 表示该列将具有字符语义.
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)
But in Oracle Databast 12c maybe 32767 (http://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF30020)
具有最大长度大小字节或字符的可变长度字符串.您必须为 VARCHAR2 指定大小.最小大小为 1 个字节或 1 个字符.最大尺寸为:如果 MAX_STRING_SIZE = EXTENDED,则为 32767 字节或字符4000 字节或字符,如果 MAX_STRING_SIZE = STANDARD
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
相关文章