Question

I try to implement inheritance with Oracle Objects :

CREATE OR REPLACE TYPE ENREG_320_BASE AS OBJECT ( .....) NOT FINAL
CREATE OR REPLACE TYPE ENREG_320_03 AS OBJECT UNDER ENREG_320_BASE( .....) FINAL

I have an error :

Error: ORA-06550: line 1, column 29: PLS-00103: Encountered the symbol "UNDER" when expecting one of the following:

( not external JAVA_ BOUND_ The symbol "(" was substituted for "UNDER" to continue. ORA-06550: line 2, column 17: PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:

. ( ) , * @ % & | = - + < / > at in is mod remainder not range rem => .. <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKE ORA-06550: line 3, column 27: PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:

Probably there is something I do wrong (first time trying inheritance in PLSQL). Can you help ?

PS : I work with Oracle 10

Thank you

Was it helpful?

Solution

We don't need AS OBJECT when creating sub-types. It's implied by the UNDER keyword.

You should bookmark the documentation in your browser. It's great for answrering questions like this. Find it here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top