The afiseaza_animal
procedure belongs to the type and you need to define it in the body of the type (using CREATE TYPE BODY
) and not as a standalone procedure (using CREATE PROCEDURE
).
DROP TYPE specii_inr;
CREATE TYPE specii_inr UNDER gestiune_zoo (
specii_inrudite VARCHAR2(20),
OVERRIDING member procedure afiseaza_animal
);
/
CREATE OR REPLACE TYPE BODY specii_inr AS
OVERRIDING MEMBER PROCEDURE afiseaza_animal IS
BEGIN
dbms_output.put_line('Animale inrudite: '||specii_inrudite);
END afiseaza_animal;
END;
/
solved object creation generates error in oracle