The maximum length of VARCHAR in Oracle depends on the Oracle version and database character set: 4000 bytes for Oracle 11g and earlier versions, 32767 bytes for Oracle 12c and later versions. The maximum length is 4000 characters for single-byte character sets (such as ASCII) and 2000 characters for multi-byte character sets (such as UTF-8).
Maximum length of VARCHAR in Oracle
The maximum length of VARCHAR (variable character) data type in Oracle depends Depends on the Oracle version and database character set used.
Oracle version | Maximum length |
---|---|
Oracle 11g and earlier | 4000 bytes |
Oracle 12c and later | 32767 bytes |
Database character set | Maximum length |
---|---|
Single-byte character set (such as ASCII) | 4000 characters |
Multi-byte character set (such as UTF -8) | 2000 characters |
Example:
When using the ASCII single-byte character set In Oracle 12c database, the maximum length of VARCHAR is 4000 characters. In Oracle 12c database using the UTF-8 multibyte character set, the maximum length of VARCHAR is 2000 characters.
Note:
The above is the detailed content of What is the maximum length of varchar in oracle. For more information, please follow other related articles on the PHP Chinese website!