Rules tagged with: Variable
Variables and data types.
All 22 check SQL or PL/SQL code (G- codes). 1 also applies to PostgreSQL. Browse the rules below for explanations, examples and recommended fixes.
Most severe Variable rules
- G-2145 Never self-assign a variable. Blocker
- G-2150 Avoid comparisons with NULL value, consider using IS [NOT] NULL. Blocker
- G-2190 Avoid using ROWID or UROWID. Blocker
- G-2310 Avoid using CHAR data type. Blocker
- G-2320 Never use VARCHAR data type. Blocker
- G-2330 Never use zero-length strings to substitute NULL. Blocker
All 22 Variable rules
-
G-2110 Try to use anchored declarations for variables, constants and types.Major Reliability
-
G-2120 Try to have a single location to define your types.Minor Maintainability
-
G-2130 Try to use subtypes for constructs used often in your code.Minor Maintainability
-
G-2135 Avoid assigning values to local variables that are not used by a subsequent statement.Major Reliability
-
G-2140 Never initialize variables with NULL.Minor Maintainability
-
G-2145 Never self-assign a variable.Blocker Maintainability
-
G-2150 Avoid comparisons with NULL value, consider using IS [NOT] NULL.Blocker Reliability
-
G-2160 Avoid initializing variables using functions in the declaration section.Critical Reliability
-
G-2170 Never overload variables.Major Maintainability
-
G-2180 Never use quoted identifiers.Major Maintainability
-
G-2185 Avoid using overly short names for explicitly or implicitly declared identifiers.Major Maintainability
-
G-2190 Avoid using ROWID or UROWID.Blocker Reliability
-
G-2210 Avoid declaring NUMBER variables, constants or subtypes with no precision.Critical Reliability
-
G-2220 Try to use PLS_INTEGER instead of NUMBER for arithmetic operations with integer values.Critical Reliability
-
G-2230 Try to use SIMPLE_INTEGER datatype when appropriate.Critical Reliability
-
G-2310 Avoid using CHAR data type.Blocker Reliability
-
G-2320 Never use VARCHAR data type.Blocker Maintainability
-
G-2330 Never use zero-length strings to substitute NULL.Blocker Maintainability
-
G-2340 Always define your VARCHAR2 variables using CHAR SEMANTIC (if not defined anchored).Blocker Reliability
-
G-2410 Try to use boolean data type for values with dual meaning.Minor Maintainability
-
G-2510 Avoid using the LONG and LONG RAW data types.Major Maintainability
-
G-2610 Never use self-defined weak ref cursor types.Minor Maintainability
22 total
Related tags
Tags that appear on the same rules as Variable:
- Performance (4 shared)
More ways to browse rules
- Trivadis PL/SQL & SQL guideline rules - Rules that implement the Trivadis coding guidelines.
- OWASP-related security rules - Rules that name an OWASP Top 10 risk category.
- Oracle APEX rules - Checks for APEX applications, pages, items and regions.
- PostgreSQL rules - Rules that also apply to PostgreSQL and PL/pgSQL.
- Security rules - All rules in the Security quality area.
- Reliability rules - Rules that prevent bugs and failures at run time.
- Maintainability rules - Rules for code that is easy to read and change.
- Rules by quality area - Security, reliability and maintainability.
- Rules by severity - From Blocker to Info.
- Rule profiles - Essential to Extreme: which rules are checked.
- All rules - Search and filter the complete rule set.