rspec/rules/S2566/plsql/rule.adoc
2022-02-04 16:28:24 +00:00

38 lines
560 B
Plaintext

Currently, ``++VARCHAR++`` and ``++VARCHAR2++`` are identical data types. But to prevent future changes in behavior, Oracle recommends the use of ``++VARCHAR2++``.
== Noncompliant Code Example
[source,sql]
----
DECLARE
var VARCHAR(42); -- Noncompliant
BEGIN
NULL;
END;
/
----
== Compliant Solution
[source,sql]
----
DECLARE
var VARCHAR2(42); -- Noncompliant
BEGIN
NULL;
END;
/
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]