34 lines
1011 B
Plaintext
34 lines
1011 B
Plaintext
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
|
|
|
|
[source,sql]
|
|
----
|
|
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;
|
|
/
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|