BEGIN
select fieldname into .... from table where ....
EXCEPTION
WHEN ON_DATA_FOUND THEN --查不到就会执行这条语句
RETURN -1;
END;
select fieldname into .... from table where ....
EXCEPTION
WHEN ON_DATA_FOUND THEN --查不到就会执行这条语句
RETURN -1;
END;