Oracle supports four string datatypes, summarized in the following table. Which type you should use depends on your answers to the following two questions:
Are you working with variable-length or fixed-length strings?
Do you want to use the database character set or the national character set?
Database character set
National character set
You will rarely need or want to use the fixed-length CHAR and NCHAR datatypes in Oracle-based applications; in fact, I recommend that you never use these types unless there is a specific requirement for fixed-length strings. See Mixing CHAR and VARCHAR2 Values for a description of problems you may encounter when mixing fixed- and variable-length string variables. (The NCHAR and NVARCHAR2 datatypes are discussed in Chapter 25.)
VARCHAR2 variables store variable-length character strings. When you declare a variable-length string, you must also specify a maximum length for the string, which can range from 1 to 32,767 bytes. You may specify the maximum length in terms of characters or bytes, but either way the length is ultimately defined in bytes. The general format for a VARCHAR2 declaration is:
max_length[CHAR | BYTE]);
Is the name of the variable you want to declare.
Is the maximum length of the variable.
Indicates that max_length is expressed in terms of characters.
Indicates that max_length represents ...