Implementations of routines
Routines can be implemented in a variety of ways. A routine implementation is essentially the underlying form of the routine that contains the logic that is run when a routine is invoked. Understanding the different supported routine implementations can help you understand how routines work and help you determine which routine implementation to choose when implementing user-defined routines.
Built-in routines can be implemented as built-in routines, SQL routines, or external routines. However, their implementation is essentially invisible to the user and in general is of little concern to the user.
User-defined routines can be implemented as sourced routines, SQL routines, or external routines.
A good understanding of the routine implementations can help you make good implementation decisions as well as help you to debug and troubleshoot existing routines.