Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL accepts INTEGER as a variable name . why?

2753817Nov 5 2015 — edited Nov 5 2015

Hi All

I am so surprised with the below behavior.
I thought till now that that data type name can not be used as a variable name but below code is not failing. I tried to create a variable named INTEGER of VARCHAR.

Can anyone explain the below behavior and share some good article on the same if you have. Thanks !

DECLARE

INTEGER VARCHAR2(100);

BEGIN

    INTEGER := 'ABCDEF';

   

    DBMS_OUTPUT.PUT_LINE('Print the integer: '||pls_INTEGER);

  

END;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2015
Added on Nov 5 2015
4 comments
1,076 views