title: PL/SQL Procedure with parameter
body: <p>I'm dead tired and my assignment is due in seven hours. I need a kind soul(s) to help me! </p>
  
  <p>So this is my first PL/SQL class. We are starting work on Procedures and Functions. </p>
  
  <p>So here is the one I am stuck on. The question says:</p>
  
  <p>This question uses the wf_countries table. </p>
  
  <p>A. Create a procedure that accepts a country_id as a parameter and displays the name of the country and its 
  capitol city. Name your procedure get_country_info. Save your procedure definition for later use. </p>
  
  <p>B. Execute your procedure from an anonymous block, using country_id 90. </p>
  
  <p>C. Re-execute the procedure from the anonymous block, this time using country_id 95. What happens? </p>
  
  <p>D. Retrieve your procedure code from Saved SQL and modify it to trap the NO_DATA_FOUND exception in an exception handler. Re-execute the procedure using country_id 95 again. Now what happens? </p>
  
  <p>Here is what I wrote for A:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE get_country_info
  (p_id IN wf_countries.country_id%TYPE,
  p_capitol OUT wf_countries.capitol%TYPE,
  p_name OUT wf_countries.country_name%TYPE)
  IS
  BEGIN
  SELECT capitol, country_name 
  INTO p_capitol, p_name
  FROM wf_countries
  WHERE country_id=p_id;
  END;
  </code></pre>
  
  <p>I got it to run. But then I realized that if I try to call the procedure by typing:</p>
  
  <pre><code>BEGIN
  get_country_info
  END;
  </code></pre>
  
  <p>that I need the country ID. Duh. But I can't just put get_country_info(90) because it is expecting more parameters. I only need to use the country ID as the parameter and DISPLAY the name and capitol. </p>
  
  <p>I'm really frustrated and appreciate any help that you might offer. </p>