Skip to Main Content

Database Software

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!

Static constants in object types

gaverillJun 3 2015 — edited Jan 11 2016

I'd like to see static constants added to object type declarations:

create or replace type OMyObject

is object

(

    MY_CONSTANT   constant number(4)    := 1234     -- adds CONSTANT keyword and literal value assignment

,

    attribute1    varchar2(10)

,

...

)

/

exec DBMS_OUTPUT.Put_Line(OMyObject.MY_CONSTANT)     -- Type constant is accessible just like a package constant/variable

/

Gerard

Comments
Post Details
Added on Jun 3 2015
6 comments
2,329 views