Home

%TYPE and %ROWTYPE should not be used in package specification

Rule description

  • %TYPE and %ROWTYPE should not be used in package specification

 

Non-compliant Code Example

CREATE OR REPLACE PACKAGE PKGCUSTOMER IS

    TYPE CustomType IS RECORD (customVariable CustTable.CustColumn%TYPE); --Non compliant code (%TYPE and  %ROWTYPE is used in package specification)

    FUNCTION GetCustomerName(param1 IN CustTable.CustColumn%TYPE,param2 IN CustTable.CustColumn%ROWTYPE) RETURN VARCHAR2; --Non compliant code (%TYPE and  %ROWTYPE is used in package specification)

    FUNCTION GetCustomerAddress(param1 IN CustTable%ROWTYPE) RETURN VARCHAR2; --Non compliant code (%TYPE and  %ROWTYPE is used in package specification)

END
Visual Expert 2020
 VEPLSQLRULE143