如何获取MySQL数据库的更新时间

时间:2016-05-21 06:05:29

标签: php mysql

我需要一个帮助。我正在尝试知道MySQL表的最后更新时间。我使用了以下命令。

show table status from spesh like 'db_restaurant_detail';

但我发现了以下结果。

mysql> show table status from spesh like 'db_restaurant_detail';
+----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
| 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 |
+----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
| db_restaurant_detail | InnoDB |      10 | Compact    | 1171 |            167 |      196608 |               0 |            0 |   5242880 |           7377 | 2016-04-26 08:34:47 | NULL        | NULL       | latin1_swedish_ci |     NULL |                |         |
+----------------------+--------+---------+------------+------+----------------+-------------+-----------------

此处update_time显示null。当用户更新此表中的数据时我需要。请帮助我。

0 个答案:

没有答案