I need to create and initialize an object from a subtype B, with supertype A in PL/SQL:
create or replace
TYPE "A" as object{
school_category varchar(10);
}
create or replace
TYPE "B" UNDER A {
school_name varchar(10);
school_ranking INTEGER;
}
Now, I when I run the below code:
Declare
i_B B;
BEGIN
i_B := B('name_sample', 12, A('elementary'));
END;
I get below error:
PLS-00306: wrong number or types of arguments in call to 'B'
I really appreciate your help on this. Thanks a lot.