title: where to define default value in oracle package
body: <p>when you define a package in oracle there is a like a header and then a body.</p>
  
  <p>One must define all parameters in both locations. I want to make one of the parameters optional for the calling program (IBM message broker). Do I have to add the default value in both the header and body definition?</p>
  
  <p>Addionally, can anyone confirm that messagebroker will be able to call the proc with out specifying any value for the parameter with a default?</p>
  
  <p>Thanks!</p>
  
  <p>Update: I notice that I can add the default into the header and not the body, or I can add it into both. I cannot add it into just the body.</p>
  
  <p>What is the differance between adding it to both vs just the header?</p>
  
  <p>Update:</p>
  
  <p>I can do this where I only specify the default in the spec and not the body. Or i can also specify the default in both places. What is the differance?</p>
  
  <pre><code>create or replace
  package myPackage is
  PROCEDURE myProc  (
      parm1 IN varchar2,                           
      parm1 IN date,                     
      parm1 IN number default null
  );
  end myPackage;
  
  create or replace
  package body myPackage is
  PROCEDURE myProc  (
      parm1 IN varchar2,                           
      parm1 IN date,                     
      parm1 IN number
  ) is
  ...
  ...
  ...
  end myProc;
  end myPackage;
  </code></pre>