Difference between revisions of "MySQL"

Jump to navigation Jump to search
213 bytes added ,  22:13, 22 October 2013
→‎SHOW etc: Added "Database Sizes"
(→‎SHOW etc: Added "Database Sizes")
Line 264: Line 264:
SHOW INDEX FROM table;                                # Show tables index/key information
SHOW INDEX FROM table;                                # Show tables index/key information
SHOW CREATE TABLE table;                              # Shows syntax that would be used to recreate a table
SHOW CREATE TABLE table;                              # Shows syntax that would be used to recreate a table
</source>
==== Database Sizes ====
<source lang="mysql">
SELECT table_schema "Database", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "Size (MB)" FROM information_schema.tables GROUP BY table_schema;
</source>
</source>


Navigation menu