Introduction

You cannot declare the same identifier twice in the same PL/SQL unit.

If you do, an error occurs when you reference the duplicate identifier.

Demo

SQL>
SQL> DECLARE-- from w ww .  jav  a  2  s.c  om
  2    id  BOOLEAN;
  3    id  VARCHAR2(5);  -- duplicate identifier
  4  BEGIN
  5    id := FALSE;
  6  END;
  7  /
  id := FALSE;
  *
ERROR at line 5:
ORA-06550: line 5, column 3:
PLS-00371: at most one declaration for 'ID' is
permitted
ORA-06550: line 5, column 3:
PL/SQL: Statement ignored


SQL>

Related Topic