MySQL :: MySQL 9.0 Reference Manual :: 27.3 JavaScript Stored Programs

submited by
Style Pass
2024-10-07 20:30:02

Support for JavaScript stored routines requires installation of the Multilingual Engine (MLE) component. For information about installing and configuring the MLE component, see Section 7.5.6, “Multilingual Engine Component (MLE)”.

JavaScript stored programs can be used together with other user-created and MySQL-native stored programs (subject to limitations described elsewhere in this section), as well as with MySQL system and user variables. We can see some of this here, using the add_nos() function created in the previous example:

JavaScript stored programs can also take column values as arguments. JavaScript stored functions can be invoked anywhere in an SQL expression that it is legal to use any other function, such as in WHERE, HAVING, ORDER BY, and JOIN clauses. They can also be invoked within the body of a trigger or event definition, although the definitions themselves must be written in SQL. Examples of some of these features can be found later in this section (see Section 27.3.9, “JavaScript Stored Program Examples”).

Leave a Comment
Related Posts