How can we see MySQL temporary tables in the list of tables?


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 −

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.

Updated on: 22-Jun-2020

157 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements