
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
== Why is this an issue?
|
|
|
|
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)
|
|
|
|
=== Message
|
|
|
|
Use a different data type.
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|