When you write stored procedures in MySQL, you sometimes need to
generate queries on the fly, for example as you process the
result of another query. This is supported using prepared statements. This blog explores how
you can take advantage of the
sys schema to simplify
the use of dynamic queries.
Executing a query using the sys.execute_prepared_stmt() procedure.
sys schema includes several stored procedures
and functions as well as views to make the database
administrator’s life easier. One of these is the