Overview of SQL routines

SQL routines are routines that have logic implemented with only SQL statements, including SQL Procedural Language (SQL PL) statements.

SQL routines are characterized by having their routine-body logic contained within the CREATE statement that is used to create them. You can create SQL procedures, SQL functions, and SQL methods. Although they are all implemented in SQL, each routine functional type has different features.

Before deciding to implement a SQL routine, it is important that you first understand what SQL routines are, how they are implemented, and used by reading the Overview of routines topic. With that knowledge you can then learn more about SQL routines from the following concept topics so that you can make informed decisions about when and how to use them in your database environment:
  • SQL procedures
  • SQL functions
  • Tools for developing SQL routines
  • SQL Procedural Language (SQL PL)
  • Comparison of SQL PL and inline SQL PL
  • SQL PL statements and features
  • Supported inline SQL PL statements and features
  • Determining when to use SQL procedures or SQL functions
  • Restrictions on SQL routines
After having learned about SQL routines, you might want to do one of the following tasks:
  • Develop SQL procedures
  • Develop SQL functions
  • Develop SQL methods