A script-enabled browser is required for this page to function properly.

String Length Required for VARCHAR2

Versions after PL/SQL V1 require a length for all VARCHAR2 variables. If a length is already specified for a CHAR datatype, the conversion utility uses that length when replacing the declaration with VARCHAR2 (see CHAR replaced by VARCHAR2 for more information). For example:

var1 CHAR(10); 

. . .is converted to:

var1 VARCHAR2(10);

When the converter detects a CHAR or VARCHAR2 statement without a string length, it suggests a length of one character. For example:

var2 CHAR;

. . .is converted to:

var2 VARCHAR2(1);

Similarly,

var3 VARCHAR2;

. . .is converted to:

var3 VARCHAR2(1);

If you do not supply a length for a VARCHAR2 declaration, the compiler generates this error message:

ERROR 215: String length constraint must be in range (1 . . 32767)