Procedure exercise a write a procedure that displays

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

4.Procedure Exercise: A.Write a procedure that displays the number of countries in a given region whose highest elevations exceed a given value. The procedure should accept two formal parameters, one for 3 a region_id and the other for an elevation value for comparison. Use DBMS_OUTPUT.PUT_LINE to display the results in a message. Save your procedure code.
B.Execute your procedure using the value 5 for the region_id and 2000 for the highest elevation.
C.DESCRIBE your procedure to check the names and datatypes of its formal parameters.
D.Retrieve your procedure code from Saved SQL and modify it to accept a third formal parameterof datatype CHAR. The procedure should display a count of the number of countries in a given region whose highest elevations exceed a given value and whose country name starts with a given alphabetic character. Your SELECT statement should include a WHERE condition to compare the first character of each country’s name with the third parameter value (Hint: use SUBSTR). Save your work again and DESCRIBE the modified procedure.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture