Q:

Write a PL/SQL block to show the result to neglect the case sensitivity of a user defined identifier which is also a reserved word

0

Write a PL/SQL block to show the result to neglect the case sensitivity of a user defined identifier which is also a reserved word.

In the example below the reference is a quoted user-defined identifier which is also a reserved word, neglecting its case-sensitivity.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

DECLARE
  "WORLD" varchar2(10) := 'world';  -- WORLD is not a reserved word
  "DECLARE" varchar2(10) := 'declare';  -- DECLARE is a reserved word
BEGIN
  DBMS_Output.Put_Line(World);      -- Identifier is case-insensitive
  DBMS_Output.Put_Line("Declare");      -- Identifier is case-sensitive
end;
/

Sample Output:

ORA-06550: line 6, column 25:
PLS-00201: identifier 'Declare' must be declared
ORA-06550: line 6, column 3:
PL/SQL: Statement ignored

4. BEGIN
5.   DBMS_Output.Put_Line(World);      -- Identifier is case-insensitive
6.   DBMS_Output.Put_Line("Declare");      -- Identifier is case-sensitive
7. end;
8. /

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now