Oracle PL/SQL - Neglecting Double Quotation Marks

Introduction

The following code references a quoted user-defined identifier that is a reserved word.

Demo

SQL>
SQL> DECLARE--   ww  w.j a v  a2  s .  co  m
  2   "MYNAME" varchar2(10) := 'myname';  -- MYNAME is not a reserved word
  3   "BEGIN" varchar2(10) := 'begin';  -- BEGIN is a reserved word
  4  BEGIN
  5   DBMS_Output.Put_Line(Hello);      -- Double quotation marks are optional
  6   DBMS_Output.Put_Line("BEGIN");    -- Double quotation marks are required
  7  end;
  8  /
myname
begin

PL/SQL procedure successfully completed.

SQL>

Related Topic