Archive for May, 2017

Call Oracle stored procedure from Toad

I wanted to test an oracle stored procedure using Toad – I wanted to set the variables in SQL, call the SP, and show the results. Here is what I came up with. Note that the “pTotal” variable is declared as an “OUT” variable in the SP (pTotal OUT NUMBER):

DECLARE
pCoaster VARCHAR2(25) := ‘Mine Ride’;
pTotal NUMBER := 0;
BEGIN
coaster_package.GetCoasterRideCounts(pCoaster, pTotal);
dbms_output.put_line(pTotal);
END;

Leave a comment