Stored routines cannot contain arbitrary SQL statements. The following statements are disallowed within stored routines:
* CHECK TABLES
* LOCK TABLES, UNLOCK TABLES
* LOAD DATA, LOAD TABLE
* SQL prepared statements (PREPARE, EXECUTE, DEALLOCATE PREPARE). Implication: You cannot use dynamic SQL within stored routines (where you construct dynamically statements as strings and then execute them). This restriction is lifted as of MySQL 5.0.13 for stored procedures; it still applies to stored functions and triggers.
* OPTIMIZE TABLE
[...]
Partager