content_image/685530.jpg
## Chapter 25 Stored Objects 

## Table of Contents 

<img src='content_image/685530.jpg'>

This chapter discusses stored database objects that are defined in terms of SQL code that is stored on the server for later execution. 

Stored objects include these object types: 

•Stored procedure: An object created with CREATE PROCEDURE  and invoked using the CALL  statement. A procedure does not have a return value but can modify its parameters for later inspection by the caller. It can also generate result sets to be returned to the client program. 

•Stored function: An object created with CREATE FUNCTION  and used much like a built-in function. You invoke it in an expression and it returns a value during expression evaluation. 

•Trigger: An object created with CREATE TRIGGER  that is associated with a table. A trigger is activated when a particular event occurs for the table, such as an insert or update. 

•Event: An object created with CREATE EVENT  and invoked by the server according to schedule. 

•View: An object created with CREATE VIEW  that when referenced produces a result set. A view acts as a virtual table. 

Terminology used in this document reflects the stored object hierarchy: 

•Stored routines include stored procedures and functions. 

