CREATE OR REPLACE TYPE HTML_OBJ_Record is object (Body_String Clob)
CREATE OR REPLACE TYPE HTML_OBJ AS OBJECT (
HTML_Record HTML_OBJ_Record,
MEMBER PROCEDURE init( SELF IN OUT NOCOPY HTML_OBJ)
)
CREATE OR REPLACE TYPE BODY HTML_OBJ AS
MEMBER PROCEDURE init (SELF IN OUT NOCOPY HTML_OBJ) IS
BEGIN
SELF.HTML_Record:=new HTML_OBJ_Record(null);
SELF.HTML_Record.body_string:='Hello';
END;
END;
declare
html HTML_OBJ;
begin
html := new HTML_OBJ(null);
DBMS_OUTPUT.put_line('=> '||html.HTML_Record.body_string);
html.init();
DBMS_OUTPUT.put_line('=> '||html.HTML_Record.body_string);
end;