1

I need one help .I am trying to know last updated time of MySQL table .I used the below command.

show table status from spesh like 'db_restaurant_detail';

But i found the following result.

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 |                |         |
+----------------------+--------+---------+------------+------+----------------+-------------+-----------------

Here update_time is showing null. I need when user has updated data in this table.Please help me.

satya
  • 3,508
  • 11
  • 50
  • 130
  • may be this will hep you: `SELECT update_time FROM information_schema.tables WHERE table_schema = 'dbName' AND table_name = 'tableName'` – Murad Hasan May 21 '16 at 06:10
  • @FrayneKonok : its also showing `null`. – satya May 21 '16 at 06:15
  • Check out this, may be helpful: [http://stackoverflow.com/questions/13403016/getting-the-date-time-of-the-last-change-to-a-mysql-database](http://stackoverflow.com/questions/13403016/getting-the-date-time-of-the-last-change-to-a-mysql-database) – Murad Hasan May 21 '16 at 06:16
  • @FrayneKonok : This link has also what u have shared and i am getting the result as `null`. – satya May 21 '16 at 06:20
  • Add a column to store that expressly – Strawberry May 21 '16 at 09:27

0 Answers0