I’m creating types this way:
CREATE OR REPLACE TYPE t_type1 AS OBJECT
(
-- fields
);
CREATE OR REPLACE TYPE t_user AS OBJECT
(
-- fields
) NOT FINAL;
CREATE OR REPLACE TYPE t_type2 AS TABLE OF t_type1;
CREATE OR REPLACE TYPE t_superuser UNDER t_user
(
-- fields
field t_type2
);
The error arises on executing “CREATE OR REPLACE TYPE t_type2 AS TABLE OF t_type1;” – it return syntax error. Therefore I can’t complete the last statement.
This construct
CREATE OR REPLACE TYPE othertype ( field typetable )is semantically incorrect.You create your first type as follows :
And a second one as follows:
Or if you would like to create an object type: