MySQueaL Resources

resources for mysql admins and developers who are squealing for help

More Resources

Main Doc Pages
Comments
MySQL columns: everywhere I look are tables and columns; life is filled with databases of information to be ordered and grouped. (Ca'Grande, Milan, Italy)

SHOW OPEN TABLES Statement

Use this MySQL statement to display a list of tables that are open; that is to say, in the table cache. The list does not include any temporary tables.

hits past month: 9 ;  last updated: may 4, 2009 - 2:34am ;  parent: MySQL Table & Server Administration Statements

Syntax

SHOW OPEN TABLES [FROM database] [LIKE 'pattern'|WHERE expression]

Explanation

Use this MySQL statement to display a list of MySQL tables that are open; that is to say, in the table cache. The list does not include any temporary tables. The LIKE clause can be used to limit the tables displayed by a naming pattern. Similarly, the WHERE clause may be used to refine the results set.

Examples

Below is an example of this MySQL statement:

SHOW OPEN TABLES 
FROM college LIKE '%student%';
 
+----------+--------------------+--------+-------------+
| Database | Table              | In_use | Name_locked |
+----------+--------------------+--------+-------------+
| college  | student_surveys    |      0 |           0 | 
| college  | students           |      0 |           0 | 
| college  | student_exams      |      0 |           0 | 
| college  | student_exams_past |      0 |           0 | 
+----------+--------------------+--------+-------------+
Return to MySQL Table & Server Administration Statements page of our MySQL Documentation