Home  >  Article  >  Database  >  What is the maximum length of varchar in oracle

What is the maximum length of varchar in oracle

下次还敢
下次还敢Original
2024-05-08 18:00:28699browse

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).

What is the maximum length of varchar in oracle

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 actual maximum length of VARCHAR may be affected by server memory and other resource limitations.
  • If the length of VARCHAR exceeds the maximum, Oracle will truncate the data and display an error message.

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn