Nesting SHOW TABLE STATUS

Using MySQL’s “SHOW TABLE STATUS” within other select statements requires pulling this information from the information_schema database. If you where to run this sql statement:

SELECT * FROM (SHOW TABLE STATUS FROM db_name)

MySQL will return a syntax error. Try this method instead for the same result:

SELECT * FROM (
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA=’db_name’
AND TABLE_NAME=’tbl_name’)

Posted February 13, 2007 | Filed under MySQL Scripts [permalink]

Leave a Reply

You must be logged in to post a comment.


News Categories

Tutorials and Docs

Sponsors

Syndicate DBA Place

Search

Archives

September 2010
M T W T F S S
« Jan    
 12345
6789101112
13141516171819
20212223242526
27282930  

Sponsors

26 queries. 0.201 seconds