Character data types stores strings that contain character data.
You decide which type to use based on the maximum length needed.
Oracle support Unicode character literals, where some characters consist of multiple bytes.
Oracle offers a number of alphanumeric data types.
If you create a table and you use the VARCHAR data type, the Oracle DBMS translates VARCHAR to VARCHAR2.
If VARCHAR2 data type (32767) is insufficient for a specific column, you can use the CLOB (Character Large Object) data type.
The following table shows some simple examples of character data types.
Example | Description |
---|---|
VARCHAR2(25) | Alphanumeric, variable length, up to 25 characters |
CHAR(4) | Alphanumeric, fixed length, four characters |
CLOB | Alphanumeric, larger than the maximum size of the VARCHAR2 data type |
The following table lists the maximum size values for the data types mentioned so far.
Data type | Maximum Size |
---|---|
NUMBER | 38 digits precision |
CHAR | 2000 |
VARCHAR2 | 4000 or 32767 |
CLOB | 4GB |
The actual units of measure used for the size of CHAR and VARCHAR2 data types depend on character semantics (bytes or characters).