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

  • pl/sql

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.

الأجوبة

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. /
هل كان المحتوى مفيد؟

معلومات ذات صلة

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...