René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

Deriving a type in PL/SQL (Inheritance)

Assuming there is already a type named ABC having a member function foo, the following construct creates a new type (not body) that inherits from ABC:
create or replace type XYZ under ABC (

  member_var varchar2(30),
  
  constructor function XYZ return self as result,

  constructor function XYZ(num in number) return self as result,

  overriding member function foo(bar in number) return baz
);
By the way, in order to be able to derive from a base type, the base type must be declared not final.