SQL Syntax Permitted in Prepared Statements Other statements are not supported. For compliance with the SQL standard, which states that diagnostics statements are not preparable, MySQL does not support the following as prepared statements: Generally, statements not permitted in SQL prepared statements are also not permitted in stored programs. Exceptions are noted in Section 25.8, “Restrictions on Stored Programs” . Metadata changes to tables or views referred to by prepared statements are detected and cause automatic repreparation of the statement when it is next executed. For more information, see Section 8.10.3, “Caching of Prepared Statements and Stored Programs” . Placeholders can be used for the arguments of the  LIMIT  clause when using prepared statements. See Section 13.2.10, “SELECT Statement” . In prepared  CALL  statements used with  PREPARE  and  EXECUTE , placeholder support for  OUT  and  INOUT parameters is available beginning with MySQL 8.0. See Section 13.2.1, “CALL Statement” , for an example and a workaround for earlier versions. Placeholders can be used for  IN  parameters regardless of version. SQL syntax for prepared statements cannot be used in nested fashion. That is, a statement passed to PREPARE  cannot itself be a  PREPARE ,  EXECUTE , or  DEALLOCATE PREPARE  statement. • SHOW WARNINGS ,  SHOW COUNT(*) WARNINGS • SHOW ERRORS ,  SHOW COUNT(*) ERRORS •Statements containing any reference to the  warning_count  or  error_count  system variable. CACHE INDEX CALL CHANGE MASTER CHECKSUM {TABLE | TABLES} COMMIT {CREATE | DROP} INDEX {CREATE | RENAME | DROP} DATABASE {CREATE | DROP} TABLE {CREATE | RENAME | DROP} USER {CREATE | DROP} VIEW DELETE DO FLUSH {TABLE | TABLES | TABLES WITH READ LOCK | HOSTS | PRIVILEGES | LOGS | STATUS | MASTER | SLAVE | USER_RESOURCES} GRANT INSERT INSTALL PLUGIN KILL LOAD INDEX INTO CACHE OPTIMIZE TABLE RENAME TABLE REPAIR TABLE REPLACE RESET {MASTER | SLAVE} REVOKE SELECT SET SHOW BINLOG EVENTS SHOW CREATE {PROCEDURE | FUNCTION | EVENT | TABLE | VIEW} SHOW {MASTER | BINARY} LOGS SHOW {MASTER | SLAVE} STATUS SLAVE {START | STOP} TRUNCATE TABLE UNINSTALL PLUGIN UPDATE 2792