在Oracle中申明与某个字段类型相同的变量
FUNCTION get_customer_name (p_customer_code IN VARCHAR2)
RETURN VARCHAR2
IS
v_result customer.customer_name%TYPE;
BEGIN
SELECT c.customer_name
INTO v_result
FROM customer c
WHERE c.customer_code = p_customer_code;
RETURN v_result;
END;