On the Internet, I often ask what is the maximum length of Oracle varchar2? In fact, this name is not accurate. varchar2 is used in both oracle SQL and pl/SQL. oracle points out in the SQL reference manual and pl/SQL reference manual: the maximum
Tips for using Oracle Database varchar2, oraclevarchar2The maximum varchar2 length of Oracle, Encoding Problems
Varchar2 type:
Set the Oracle field length to varchar2 (4000 ),
1. When the character set of the database is set to gb2312, a Chinese
Oracle defines string types VARCHAR2 and char specify the length of the usage as follows:VARCHAR2 ( ) is a number between 1~4000 that represents up to 4000 bytes of storage space.char ( ) is a number between 1~2000 that represents up to 2000 bytes
VARCHAR2 (* char) and VARCHAR2 (*)
A Hibernate automatic table was recently used, and when a string is used, the VARCHAR2 type field is created by default, such as setting length=10, after which the field property is Varchar2 (. Char), not VARCHAR2
ScenarioThe columns in the original table are defined as VARCHAR2 types, and it is well known that the maximum support length for the VARCHAR2 type is 4000. Assume that because of business needs. To convert this column to the CLOB type, it is not
Recently, I have dealt with some Oracle character data types. I want to learn from them as follows:
1. First, compare the char and varchar2 types:
Differences:
1. the length of CHAR is fixed, while the length of VARCHAR2 can be changed. For example,
Differences between varchar, varchar2, nvarchar, and nvarchar2 in Oracle and other data types, varchar2nvarchar2-- Varchar, varchar2 contact: 1. varchar/varchar2 is used to store variable-length strings
For example, if varchar (20) is saved to the
Differences between varchar, varchar2, nvarchar, and nvarchar2 in Oracle and other data types, varchar2nvarchar2
-- Varchar, varchar2 contact: 1. varchar/varchar2 is used to store variable-length strings
For example, if varchar (20) is saved to
Difference:
1. The length of the char is fixed, the length of the VARCHAR2 can vary, for example, the storage string "abc", for Char (20), which means that the characters you store will occupy 20 bytes (including 17 null characters), while the same
Difference:1. The length of the char is fixed, and the length of the VARCHAR2 is changeable, for example, storing the string "abc", for Char (20), which means that the characters you store will account for 20 bytes (including 17 null characters),
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.