这是我用到的一个函数
create FUNCTION get_ar_customers_row(
p_customer_id IN NUMBER DEFAULT := 2044
) RETURN ar_customers%ROWTYPE IS
l_ar_customers_row ar_customers%ROWTYPE;
BEGIN
SELECT * INTO l_ar_customers_row FROM ar_customers
WHERE customer_id = p_customer_id;
EXCEPTION
WHEN NO_DATE_FOUND THEN RETURN NULL;
END;