DROPTABLESalesSummary;QueryOK,0rowsaffected(0.00sec) The above query will delete the table, which can be confirmed from the below query - mysql>Select*fromSalesSummary;ERROR1146(42S02):Table"/> DROPTABLESalesSummary;QueryOK,0rowsaffected(0.00sec) The above query will delete the table, which can be confirmed from the below query - mysql>Select*fromSalesSummary;ERROR1146(42S02):Table">

Home  >  Article  >  Database  >  How to delete MySQL temporary table?

How to delete MySQL temporary table?

WBOY
WBOYforward
2023-09-02 11:49:06758browse

How to delete MySQL temporary table?

#We know that if the current session is terminated, the MySQL temporary table will be deleted. But still between sessions we want to drop the temporary table and instead with the help of DROP statement we can drop the temporary table. It can be understood with the help of the following example -

Example

In this example, we are deleting the temporary table named "SalesSummary"-

mysql> DROP TABLE SalesSummary;
Query OK, 0 rows affected (0.00 sec)

above The query will delete the table, it can be confirmed from the query below -

mysql> Select * from SalesSummary;
ERROR 1146 (42S02): Table 'query.SalesSummary doesn't exist

The above is the detailed content of How to delete MySQL temporary table?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete