== Why is this an issue?

At most one declaration of a variable in a given scope is allowed in PL/SQL. The ``++PLS-00371++`` error will be raised at runtime when attempting to reference a variable declared more than once.


=== Noncompliant code example

[source,sql]
----
SET SERVEROUTPUT ON

DECLARE
  foo VARCHAR2(42) := 'foo';
  foo VARCHAR2(42) := 'bar'; -- Non-Compliant
BEGIN
  DBMS_OUTPUT.PUT_LINE(foo); -- Raises PLS-00371: at most one declaration for 'FOO' is permitted
END;
/
----


=== Compliant solution

[source,sql]
----
SET SERVEROUTPUT ON

DECLARE
  foo VARCHAR2(42) := 'foo';
  bar VARCHAR2(42) := 'bar'; -- Compliant
BEGIN
  DBMS_OUTPUT.PUT_LINE(foo);
END;
/
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Remove this redundand declaration of "xxx".


endif::env-github,rspecator-view[]
