在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;

posted on 2007-02-01 20:47  bela liu  阅读(526)  评论(0编辑  收藏  举报

导航