包:
create or replace package MyTestPkg is
-- Author : WANGTL
-- Created : 2011-9-15 13:47:06
-- Purpose : forTest
-- Public function and procedure declarations
-- function < FunctionName > (< Parameter > < Datatype >) return < Datatype >;
function getCustNameCode(v_custId in cm_customer.cust_id%type)
return varchar2 ;
end MyTestPkg;
/
create or replace package body MyTestPkg is
function getCustNameCode(v_custId in cm_customer.cust_id%type)
return varchar2 is
Result varchar2(100);
begin
select t.cust_code || ' ' || t.cust_name
into Result
from so1.cm_customer t
where t.cust_id = v_custId;
return(Result);
end getCustNameCode;
end MyTestPkg;
/