How to pull Column creation & lastmodified date.

  • Hello experts,

    I’m trying to get all the available column’s creation date and also last modified date within database. I’ve tried to use the following without any luck.

    select * from sys.objects

    select * from sys.columns

    select * from information_schema.columns

    Does anybody know a way how I can get pull this information?

    Thanks a lot advance.

  • Hey guys, Nevermind I’ve able to write a select and join sys.object with sys.columns and accomplished what I needed. For reference here is my code.

    sp_msForEachdb

    'select

    ''?'',

    obj.name as TableName,

    col.name as ColumnName,

    obj.create_date as ColumnCreationDate,

    obj.modify_date as LastModifiedDate

    from ?.sys.objects obj

    inner join ?.sys.columns col

    on obj.object_id = col.object_id

    where type_desc = ''USER_TABLE'' '

    Thanks again.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply