BEGIN |
OPEN person_cur(name); -- open the cursor |
LOOP -- Fetch each row matching
|
FETCH person_cur INTO lname,fname,phone,ptype; |
EXIT WHEN person_cur%NOTFOUND;
|
/* print out the query result */ |
htp.p('The '||ptype||' phone no. of' ||fname||' '||lname||': '||phone); |
END LOOP; |
CLOSE person_cur;-- close the cursor after it is done |
END get_person_by_name; |