title: Oracle Add a new member function/procedure to an object type
body: <p>I am trying to do the following; let's say I have created an object type in Oracle</p>
  
  <pre><code>create type test as object(
  name varchar2(12),
  member procedure print1);
  /
  create type body test is
  member procedure print1 is
  begin
  dbms_output.put_line('Test');
  end print1;
  end;
  /
  </code></pre>
  
  <p>Now I want to add a new member procedure print2 - again, I can do that by typing:</p>
  
  <pre><code>alter type test
  add member procedure print2 cascade;
  </code></pre>
  
  <p>Now, my question is: how do I just define the body and add print2 without repeating other definitions? I know I can do a create or replace body test and list implementations for both procedures, but this is not practical as I have to maintain code for object types that others wrote and I have no idea how they implemented the code, just that these procedures and functions exist.</p>
  
  <p>I have been through the documentation and the web, but could not find an answer and it seems silly to me that Oracle would expect the developer to type all the definitions again.</p>
  
  <p>Regards,
  George</p>