Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Posts
    28

    Unanswered: 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.

  2. #2
    Join Date
    Oct 2009
    Posts
    28

    Done

    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.

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Glad we could be of service

    Just curious...why is this important to you?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •