Format: (not in package)
Create or replace function function_name (argu1 [mode1] datatype1, argu2 [mode2] datatype2,...) return datatype is
Result varchar2 (50 );
Begin
Return result; end;
Call:
VaR V1 varchar2 (100)
Exec: V1: = function_name;
Package:
(With parameters)Function getagentbroker (p_branchid in varchar2,
P_month in varchar2,
P_agentcode in varchar2)
Return nt_test is
V_count smallint default 0;
V_nt_test nt_test;
Begin
Return v_nt_test
End;
(No parameter)Function getagentbroker
Return nt_test is
V_count smallint default 0;
V_nt_test nt_test;
Begin
Return v_nt_test
End;
Note:
1,The method parameter cannot have a value range (test window is the opposite in batch processing), followed by a comma,Type can use the legal type in any oracle.
2,The variable must have a value range followed by a semicolon
3. You cannot create or replace a package.