Stored Routines

MySQL stored routines are preset, stored batches of SQL statements to be called upon as needed.
BEGIN...END
Use this combination of MySQL statements to start and end the steps that are part of a stored procedure or trigger.
CREATE FUNCTION
A user-defined function is in essence a set of MySQL statements that may be called as a unit, processing any data it's given in its parameters and returning a value to the caller of the function.
CALL
Use this MySQL statement to call a stored procedure.
DROP FUNCTION
Use this MySQL statement to delete a user-defined function.
CLOSE
This MySQL statement closes a cursor that has been declared within the current routine and has been opened using the OPEN statement.
SHOW CREATE FUNCTION
This MySQL statement displays an SQL statement that can be used to create a function like the one given.
DECLARE
This MySQL statement declares local variables and other items related to routines.
SHOW FUNCTION CODE
This MySQL statement displays the internal code of a function.
DELIMITER
This MySQL statement changes the delimiter (terminating character) of SQL statements from the default of a semi-colon to another character.
SHOW FUNCTION STATUS
This MySQL statement displays information on user-defined functions.
DROP PREPARE
This MySQL statement deletes a prepared statement.
ALTER PROCEDURE
This MySQL statement changes the characteristics of an existing stored procedure.
EXECUTE
This MySQL statement executes a user-defined prepared statement.
CREATE PROCEDURE
A procedure, also known as a stored procedure, is set of MySQL statements stored on the MySQL server and called as a unit, processing any data it's given in its parameters.
FETCH
A cursor is similar to a MySQL table or a view: it represents, within a procedure, a results set that is retrieved one row at a time using this MySQL statement.
DROP PROCEDURE
This MySQL statement deletes a stored procedure.
OPEN
This MySQL statement opens a cursor that has been declared within the current routine.
SHOW CREATE PROCEDURE
This MySQL statement displays an SQL statement that can be used to create a stored procedure like the one given.
PREPARE
This MySQL statement creates a prepared statement.
SHOW PROCEDURE CODE
This MySQL statement displays the internal code of a stored procedure.
ALTER EVENT
Use this MySQL statement to alter an existing scheduled MySQL event.
SHOW PROCEDURE STATUS
This MySQL statement displays information on stored procedures.
CREATE EVENT
Use this MySQL statement to schedule the execution of an SQL statement at a specific time and date.
ALTER TRIGGER
There is not an ALTER TRIGGER statement in MySQL at this time.
DROP EVENT
This MySQL statement deletes an event.
CREATE TRIGGER
Triggers are actions to be taken when a user requests a change to data in MySQL.
SHOW CREATE EVENT
This MySQL statement displays an SQL statement that can be used to create an event like the one given.
DROP TRIGGER
This MySQL statement deletes a trigger.
SHOW EVENTS
This MySQL statement displays a list of scheduled events on the server.
SHOW TRIGGERS
This MySQL statement displays a list of triggers on the server.
ALTER FUNCTION
This MySQL statement changes the characteristics of an existing user-defined function.

Need Math Examples

Although we did well in math classes all through school, we have very little experience with the Math Functions of MySQL very little. As a result, we don't have very good examples for them. If you work in science or engineering and have some ideas for easy to understand examples that we can add, please tell us.

MySQL Replication

Whether you’re new to MySQL replication or have been using it for some time, you will find this new book useful. It will help you actually to understand MySQL replication so you can keep it running. It’s especially useful when replication stops and you can’t get it started again.