Syntax\n------\n\n{DEALLOCATE | DROP} PREPARE stmt_name\n\nDescription\n-----------\n\nTo deallocate a prepared statement produced with PREPARE, use aDEALLOCATE PREPARE statement that refers to the prepared statement name.\n\nA prepared statement is implicitly deallocated when a new PREPARE command is issued. In that case, there is no need to use DEALLOCATE.\n\nAttempting to execute a prepared statement after deallocating it results in an error, as if it was not prepared at all:\n\n``sql\nERROR 1243 (HY000): Unknown prepared statement handler (stmt_name) given to EXECUTE\n`\n\nIf the specified statement has not been PREPAREd, an error similar to the following will be produced:\n\n`sql\nERROR 1243 (HY000): Unknown prepared statement handler (stmt_name) given to DEALLOCATE PREPARE\n``\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/prepared-statements/deallocate-drop-prepare