[Oracle] the difference between a stored Procedure (Procedure) and a (custom) Function (Function) the Stored Procedure (custom) Function needs to be executed independently, and there is not necessarily a return value; functions can be called everywhere and must return values, not necessarily variables or tables. It is used to complete specific operations or tasks in the database. When declared in the header of a specific data program, it does not need to be described. When declared in the header of the returned type program, it must return the type. It can be executed as an independent statement and cannot be executed independently, must be called as part of the expression. Zero or multiple values can be returned through the out/in out statement. One value can be returned through the return statement. in the SQL statement, the stored procedure and function execution cannot be called in the SQL statement. the essence is the same: when stored procedures and functions are executed, SQL Manager will go to procedure cache to obtain the corresponding query statement. If no query statement exists in procedure cache, SQL Manager compiles stored procedures and functions. Example: // create or replace procedure add_emailinfo (e_name email_info.fullname % type, e_address %% type) isbegininsert into email_info (fullname, email_address) values (e_name, e_address); end; // call add_emailinfo ('test _ name', 'test _ address') during the call process; // else // create or replace function sel_emailinfo (s_name email_info.fullname % type) return varchar2 isv_address varchar2 (30); beginselect email_address into v_address from email_info where trim (fullname) = trim (s_name); return v_address; end; // call the select sel_emailinfo ('test _ name') from dual;