18 Stored Procedures and Functions

MySQL provides capabilities for defining and executing stored procedures and functions. A client sends the definition of a procedure or function to the server, which stores it for later use. Clients then invoke it whenever necessary to cause SQL operations to be performed or to produce values.

Stored procedures and functions have a great deal in common and much of the discussion here applies to both. However, to avoid many repetitions of the term “procedures and functions,”the following discussion often uses “routine” to indicate material that applies to both. In cases where procedures and functions do have different properties, material that pertains only to one type of routine is indicated by one of the more ...

Get MySQL 5.0 Certification Study Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.