MySQL - узнать тип таблицы

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Перейти к:навигация, поиск


Выполняется командами:
SHOW TABLE STATUS
SHOW TABLE STATUS where Name = 'table';


Примеры выполнений:


mysql> SHOW TABLE STATUS;
+--------------------+--------+---------+------------+------+----------------+-------------+------------------+--------------+-----------+----------------+---- -----------------+---------------------+---------------------+-----------------+----------+----------------+---------+
| Name               | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length  | Index_length | Data_free |  Auto_increment | Create_time         | Update_time         | Check_time          | Collation       | Checksum | Create_options | Comment |
+--------------------+--------+---------+------------+------+----------------+-------------+------------------+--------------+-----------+----------------+---- -----------------+---------------------+---------------------+-----------------+----------+----------------+---------+
| dle_admin_logs     | MyISAM |      10 | Dynamic    |  132 |             41 |        5484 |  281474976710655 |         7168 |         0 |            133 |  2014-01-01 13:52:05 | 2014-01-04 09:22:27 | 2014-01-04 09:22:27 | utf8_general_ci |     NULL |                |         |
| dle_admin_sections | MyISAM |      10 | Dynamic    |    0 |              0 |           0 |  281474976710655 |         4096 |         0 |              1 |  2014-01-01 13:52:05 | 2014-01-04 09:22:27 | 2014-01-04 09:22:27 | utf8_general_ci |     NULL |                |         |
| dle_banned         | MyISAM |      10 | Dynamic    |    0 |              0 |           0 |  281474976710655 |         1024 |         0 |              1 | 2014- 01-01 13:52:05 | 2014-01-04 09:22:27 | 2014-01-04 09:22:27 | utf8_general_ci |     NULL |                |         |


mysql> SHOW TABLE STATUS where Name = 'dle_banned';
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------------+----------+----------------+---------+
| Name       | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time         | Check_time          | Collation       | Checksum | Create_options | Comment |
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------------+----------+----------------+---------+
| dle_banned | MyISAM |      10 | Dynamic    |    0 |              0 |           0 | 281474976710655 |         1024 |         0 |              1 | 2014-01- 01 13:52:05 | 2014-01-04 09:22:27 | 2014-01-04 09:22:27 | utf8_general_ci |     NULL |                |         |
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+--------- ------------+---------------------+---------------------+-----------------+----------+----------------+---------+
1 row in set (0.00 sec)