In many situations it is nice to know when the last update (INSERT/UPDATE/DELETE) of a DB2 table occured. Starting in DB2 11 it has become easier than ever. However it is important to have only one table for each tablespace, because update activity is recorded on tablespace level, not on table level. This is normally not a problem since most installations has a standard requiring only one table in each tablespace.
In DB2 11 IBM added an extra column to the SYSIBM.SYSTABLESPACESTATS table named LASTDATACHANGE. This timestamp is updated eah time a tablespace is updated. The value of the column is updated with some delay and this delay (up to minutes) is reflected in the value of LASTDATACHANGE. And be also aware that REORG and LOAD does not update this column. Keeping those two things in mind you can find the last update of any table like this:
SELECT T.NAME, MAX(SS.LASTDATACHANGE) LASTDATACHANGE FROM SYSIBM.SYSTABLES T, SYSIBM.SYSTABLESPACE S, SYSIBM.SYSTABLESPACESTATS SS WHERE T.NAME = 'MYTABLE' AND T.CREATOR = 'MYCREATOR' AND T.TSNAME = S.NAME AND T.DBNAME = S.DBNAME AND S.DBID = SS.DBID AND S.PSID = SS.PSID GROUP BY T.NAME
My table is called MYCREATOR.MYTABLE and the above query finds the timestamp of the last update. SYSTABLESPACESTATS contains one row for each partition of your tablespace (most tablespaces has only one) which is why there is a GROUP BY on the table name and a MAX on LASTDATACHANGE. Unfortunately SYSTABLESPACESTATS is not an accurate table so you might risk that LASTDATACHANGE contains the NULL value. Unfortunately I cannot tell you when or why this happens, but as a general rule the above SQL will work fine.