- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What happens if I will prepare the statement with the same name without de-allocating the earlier one?
Actually, in MySQL, we can prepare a statement with the same name without de-allocating the earlier one because MySQL automatically drops the prepared statements when they are redefined or when we close the connection to the server. In other words, we can say that we can use the same name for prepared statements without de-allocating them explicitly. But, to free the memory on the server side we must have to de-allocate them. It can be done with the help of DEALLOCATE statement as follows −
DEALLOCATE PREPARE statement;
Here statement is the name of the prepared statements.
DROP PREPARE statements is the synonym for de-allocating the prepared statements
mysql> DROP PREPARE stmt11; Query OK, 0 rows affected (0.00 sec)
- What happens if I will add a UNIQUE constraint on the same column for multiple times?
- What happens if I pass only one argument to the MySQL CONCAT() function?
- What happens if I will try to drop PRIMARY KEY constraint from the AUTO_INCREMENT column?
- What happens if I will delete a row from MySQL parent table?
- What happens with the output of MySQL EXPORT_SET() function if I will skip the value of the fifth argument i.e. a number of bits?
- De-structuring an object without one key
- What happens with the trigger when we will drop the table having that trigger?
- What happens if I will assign a value to a MySQL user variable using a statement that returns multiple rows?
- What will be the result if DCLGEN is given with COPY statement and not INCLUDE?
- What happens if I will use integer values as arguments of MySQL LOCATE() function?
- What happens if I use both \G and semicolon (;) termination symbol with a single MySQL statement?
- Set user-defined variable with table name in MySQL prepare statement?
- What happens if it rains in the desert?
- What happens with the output of MySQL EXPORT_SET() function if I will skip both 4th and 5th argument i.e. separator and number of bits?
- What MySQL returns on running the INSERT INTO statement without giving the column name and values both?