EXECUTE IMMEDIATE MySQL

EXECUTE IMMEDIATE MySQL

Get Social!

Unlike recent versions of Maria DB, MySQL does not currently support the command EXECUTE IMMEDIATE.

Essentially EXECUTE IMMEDIATE is shorthand for perparing a statement, executing a statement and then finally deallocating the prepaired statement.

To get round this limitation in MySQL you can create a stored procedure that wraps up the commands required to execute a statement into a procedure so that you can call it as a one-liner.

You can then call the procedure as a one-liner like this:


Visit our advertisers

Search

Quick Poll

Do you use ZFS on Linux?

Visit our advertisers