rules repository

G-2320

🆓
Error

Never use VARCHAR data type.

Reason

Do not use the varchar data type. Use the varchar2 data type instead. Although the varchar data type is currently synonymous with varchar2, the varchar data type is scheduled to be redefined as a separate data type used for variable-length character strings compared with different comparison semantics.

Example

Non-Compliant Example

create or replace package types_up is
   subtype description_type is varchar(200);
end types_up;
/
Issues
LineColumnMessage
232Use VARHCHAR2 instead of VARCHAR data type.

Compliant Solution - ★★★★★

create or replace package types_up is
   subtype description_type is varchar2(200 char);
end types_up;
/

References