O'Reilly logo

MySQL® by Paul DuBois

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Stored Programs

MySQL supports several types of objects that are stored on the server side for later use. Some are invoked on demand; others execute automatically when table modifications occur or when a scheduled time is reached:

  • Stored functions return a result from a calculation and can be used in expressions.

  • Stored procedures do not return a result directly but can be used to perform general computations or produce result sets that are passed back to the client.

  • Triggers are associated with a table and are defined to execute when the table is modified via INSERT, DELETE, or UPDATE statements.

  • Events execute on a time-activated basis according to a schedule.

MySQL added support for stored functions and procedures in version 5.0.0, triggers ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required