Home

Variables Naming Convention

Rule description

  • Variables should comply with a naming convention

 

Non-compliant Code Example

DECLARE
  CURSOR curs_customer_(customer_name VARCHAR2) RETURN customer%ROWTYPE;        --Non compliant code (Variable is not comply with the naming conversion)

  CURSOR curs_customer(customer_name VARCHAR2) RETURN customer%ROWTYPE IS SELECT * FROM CUSTOMERS WHERE name = customer_name; 
BEGIN
  NULL;
END;

Compliant Code Example

DECLARE
  CURSOR curs_customer1(customer_name VARCHAR2) RETURN customer%ROWTYPE;        --Compliant code (Variable is comply with the naming conversion)

  CURSOR curs_customer2(customer_name VARCHAR2) RETURN customer%ROWTYPE IS SELECT * FROM CUSTOMERS WHERE name = customer_name; 
BEGIN
  NULL;
END;
Visual Expert 2020
 VEPLSQLRULE126