PLSQL_8_2_Practice.docx - www.oracle.com/academy Database...

This preview shows page 1 - 3 out of 5 pages.

Database Programming with PL/SQL 8-2: Using Parameters in Procedures Practice Activities Vocabulary Identify the vocabulary word for each definition below: Parameters Pass or communicate data between the caller and subprogram. argument The actual value assigned to a parameter. Actual Parameters Can be literal values, variables, or expressions that are provided in the parameter list of a called subprogram. Formal parameter A parameter name declared in the procedure heading. Try It / Solve It 1. In your own words, describe parameters and the purpose they serve in PL/SQL subprograms.
2. Using the COUNTRIES table: 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.
v_capitol wf_countries.capitol%TYPE; BEGIN SELECT country_name, capitol INTO v_country_name, v_capitol FROM wf_countries WHERE country_id = p_country_id; DBMS_OUTPUT.PUT_LINE('The country name is '||v_country_name||‘ and the capital city is '|| v_capitol); END;

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture