Rechercher dans le manuel MySQL
Chapter 24 Stored Objects
Table of Contents [+/-]
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 theCALL
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.
Stored programs include stored routines, triggers, and events.
Stored objects include stored programs and views.
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:
For each object type, there are
CREATE
,ALTER
, andDROP
statements that control which objects exist and how they are defined. See Section 13.1, “Data Definition Statements”.The
CALL
statement is used to invoke stored procedures. See Section 13.2.1, “CALL Syntax”.Stored program definitions include a body that may use compound statements, loops, conditionals, and declared variables. See Section 13.6, “Compound-Statement Syntax”.
Metadata changes to objects referred to by stored programs are detected and cause automatic reparsing of the affected statements when the program is next executed. For more information, see Section 8.10.3, “Caching of Prepared Statements and Stored Programs”.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-stored-objects.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.