G-2340: Always define your VARCHAR2 variables using CHAR SEMANTIC (if not defined anchored).

Minor

Reliability

Reason

Changes to the NLS_LENGTH_SEMANTIC will only be picked up by your code after a recompilation.

In a multibyte environment a VARCHAR2(10) definition may not necessarily hold 10 characters, when multibyte characters a part of the value that should be stored unless the definition was done using the char semantic.

Example (bad)

CREATE OR REPLACE PACKAGE types_up IS
   SUBTYPE description_type IS VARCHAR2(200);
END types_up;
/

Example (good)

CREATE OR REPLACE PACKAGE types_up IS
   SUBTYPE description_type IS VARCHAR2(200 CHAR);
END types_up;
/