Be careful about your use of Oracle-specific data types like ROWID
and UROWID
. They might offer a slight improvement in
performance over other means of identifying a single row (primary key or unique index value), but that is by no means guaranteed.
On the other hand, the use of ROWID
or UROWID
means that your SQL statement will not be portable to other SQL databases.
Further, many developers are not familiar with these data types, which can make the code harder to maintain.
Noncompliant code example
SET SERVEROUTPUT ON
DECLARE
id rowid; -- Non-Compliant
universeId urowid; -- Non-Compliant
BEGIN
SELECT rowid INTO id FROM DUAL;
SELECT rowid INTO universeId FROM DUAL;
DBMS_OUTPUT.PUT_LINE('id = ' || id);
DBMS_OUTPUT.PUT_LINE('universe id = ' || universeId);
END;
/