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

MySQLMySQLi Database

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.

raja
Published on 22-Feb-2018 14:10:32
Advertisements