alter type student_t add member procedure add_pruefung( p pruefung_t, note number ) cascade; CREATE OR REPLACE type body student_t as member procedure add_pruefung( p pruefung_t, note number ) as p_ref ref pruefung_t; n_note note_t; begin select ref(x) into p_ref from pruefung_tab x where x.PRUEFUNGSNUMMER = p.PRUEFUNGSNUMMER; n_note := note_t(sysdate, note, p_ref); self.ERBRACHTE_PRUEFUNGSLEISTUNGEN.extend(); self.ERBRACHTE_PRUEFUNGSLEISTUNGEN(self.ERBRACHTE_PRUEFUNGSLEISTUNGEN.count()) := n_note; update student_tab x set x.ERBRACHTE_PRUEFUNGSLEISTUNGEN = self.ERBRACHTE_PRUEFUNGSLEISTUNGEN where x.MATRIKELNUMMER = self.MATRIKELNUMMER; end; end; /