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
Line | Column | Message |
---|---|---|
2 | 32 |
★★★★★
Compliant Solution -
create or replace package types_up is subtype description_type is varchar2(200 char); end types_up; /
Parameters
Use parameters to customize the rule to your needs.
Parameter | Description | Default Value |
---|---|---|
DisableAllQuickFix | Comma-separated list of rules for which a quick fix should not be applied to all the problems in a file. | Core G-3130 |
References
- same as plsql:VarcharUsageCheck
- same as Trivadis G-2320