Home

Cursor parameters should follow a naming convention

Rule description

  • Cursor parameters should follow a naming convention

 

Non-compliant Code Example

DECLARE
CURSOR deptCursor_ (departmentId_ INTEGER) RETURN departments%ROWTYPE IS  -- Non compliant code (Cursor parameters is not following a naming convention)
    SELECT * FROM departments
    WHERE department_id = departmentId_;
BEGIN
  NULL;
END;

Compliant Code Example

DECLARE
CURSOR deptCursor (departmentId INTEGER) RETURN departments%ROWTYPE IS  --Compliant code (Cursor parameters is following a naming convention)
    SELECT * FROM departments
    WHERE department_id = departmentId;
BEGIN
  NULL;
END;
Visual Expert 2020
 VEPLSQLRULE120