This topic describes how to create data of the VARCHAR2 type in PolarDB for Oracle.

Syntax

 VARCHAR2(maximum_size [CHAR | BYTE])

Parameters

Parameter Description
maximum_size The maximum length of the VARCHAR2 data type.
[CHAR | BYTE] The method that is used to measure the VARCHAR2 data length. Valid values: CHAR and BYTE.

Examples

create table t (col varchar2(10 byte));
create table t (col varchar2(10 char));