MySQL last table alteration time

Brandon Stout bms at mscis.org
Wed Mar 28 09:30:46 MDT 2007


Steve wrote:

> I don't believe a table has any concept of a time unless one of 2
> things is present.
> #1 A timestamp field is appended to the table
> #2 Logging is enabled.
>
> If #2 is true you don't actually query the table, you query the log.
> If #1 is true then you can set the timestamp field to update
> automatically each time there is an update or insert command (using a
> trigger, although IIRC this should be an automatic trigger) 

Note that triggers are supported in MySQL 5+.  If you have a previous 
version, you cannot use triggers.

Brandon Stout
http://mscis.org



More information about the PLUG mailing list