create or replace procedure last_cityperson (c_code in varchar2, c_shortname out varchar2, c_contactperson out varchar2, c_extnum out varchar2, c_cityphone out varchar2, c_airphone out varchar2, c_faxnum out varchar2 ) as row rowid; begin select max(rowid) into row from cityperson where short_name = c_code; select short_name,contact_person,ext_num,city_phone,air_phone,fax_num into c_shortname,c_contactperson,c_extnum,c_cityphone,c_airphone,c_faxnum from cityperson where rowid = row; exception when no_data_found then raise_application_error(-20101,'Record does not exist'); null; end; /