Oracle Database Object - Last DDL vs TIMESTAMP

Viewed 16136

I am trying to determine which date would be reflective of the time an object was modified on an Oracle 11g database.

last_ddl_time or Timestamp

I have read a number of threads but can't find a clear cut answer. If I am understanding correctly, there are certain events that will trigger the last DDL date to change but not the TIMESTAMP?

Could anyone elaborate. I have a beginner level understanding so patience is appreciated.

Thanks

1 Answers

Yes - check out the documentation.

LAST_DDL_TIME  Timestamp for the last modification of the object and dependent objects resulting from a DDL statement (including grants and revokes)
TIMESTAMP      Timestamp for the specification of the object (character data)

TIMESTAMP is just for the object itself - so if you create a table, this will only get updated if you alter the columns in the table, or some other property of the table itself.

LAST_DDL_TIME includes any change that affects the object, including changes to dependent objects. So if you add a constraint or a grant to your table, LAST_DDL_TIME will get updated for the table but TIMESTAMP won't.

Give it a try with some different DDL statements.

Related