As we know that we can see the list of tables in a database with the help of SHOW TABLES statement. But MySQL temporary tables are not stored in this list or in other words we can say that we cannot see the temporary tables with the help of SHOW TABLES statement. To illustrate it we are using the following example −
In this example, we are trying to get the temporary table named ‘SalesSummary’ from SHOW TABLES statement as follows −
mysql> SHOW TABLES LIKE '%Sales%'; Empty set (0.00 sec) mysql> SHOW TABLES LIKE '%SalesSummary%'; Empty set (0.00 sec)
The above query shows the empty result set means that the temporary table ‘SalesSummary’ is not in the table list of database.