Chapter 25 Stored Objects

Table of Contents

25.1 Defining Stored Programs
25.2 Using Stored Routines
25.2.1 Stored Routine Syntax
25.2.2 Stored Routines and MySQL Privileges
25.2.3 Stored Routine Metadata
25.2.4 Stored Procedures, Functions, Triggers, and LAST_INSERT_ID()
25.3 Using Triggers
25.3.1 Trigger Syntax and Examples
25.3.2 Trigger Metadata
25.4 Using the Event Scheduler
25.4.1 Event Scheduler Overview
25.4.2 Event Scheduler Configuration
25.4.3 Event Syntax
25.4.4 Event Metadata
25.4.5 Event Scheduler Status
25.4.6 The Event Scheduler and MySQL Privileges
25.5 Using Views
25.5.1 View Syntax
25.5.2 View Processing Algorithms
25.5.3 Updatable and Insertable Views
25.5.4 The View WITH CHECK OPTION Clause
25.5.5 View Metadata
25.6 Stored Object Access Control
25.7 Stored Program Binary Logging
25.8 Restrictions on Stored Programs
25.9 Restrictions on Views

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:

Terminology used in this document reflects the stored object hierarchy:

This chapter describes how to use stored objects. The following sections provide additional information about SQL syntax for statements related to these objects, and about object processing:

25.1 Defining Stored Programs
25.2 Using Stored Routines
25.3 Using Triggers
25.4 Using the Event Scheduler
25.5 Using Views
25.6 Stored Object Access Control
25.7 Stored Program Binary Logging
25.8 Restrictions on Stored Programs
25.9 Restrictions on Views