Christian Mayne

Get the last rows updated in a database

by | Jan 24, 2013 | Work | 0 comments

When debugging applications, it can be useful to see what’s going on in the database without referring to the code. In MySQL, you can use the information_schema database to get this information. here’s what I do:

Select table_name, table_rows, update_time
from tables 
where table_schema = "[database_name]"
order by update_time desc
Christian Mayne

Christian Mayne

Web developer and internet consultant, Anglo-Concertina player, fan of traditional music and record collector.