A PL/SQL subprogram that performs a specified sequence of actions, and then returns a value. Can reside and execute on the client and the database server.