Home

ROWID and UROWID data types should not be used

Rule description

  • ROWID and UROWID data types should not be used

 

Non-compliant Code Example

DECLARE
   first_name varchar2;
   customer_id ROWID;                       --Non compliant code (ROWID data type is used)
BEGIN
	UPDATE CUSTOMERS 
	SET FIRSTNAME = first_name
	WHERE ROWID = customer_id;
END;

Compliant Code Example

DECLARE
   first_name varchar2;
   customer_id INTEGER;                     --Compliant code 
BEGIN
	UPDATE CUSTOMERS 
	SET FIRSTNAME = first_name
	WHERE ROWID = customer_id;
END;
Visual Expert 2020
 VEPLSQLRULE153