You must Sign In to post a response.
  • Category: SQL Server

    How to get list of table that has no insert/update in last one year

    Hi Friends,

    How can i get list of tables in database which has no insert/Update in last one year.

    Thanks in advance.

    Aaditya Chaubey
  • #768635


    you can use simple query and get the list of details.

    Select name, id, crdate
    From sysobjects
    Where type ='U'
    and DateDiff(D,refdate,getdate()) < 365;

    We can use the above query for getting the list of tables and also if you want Procedure we can use 'P' in the query.


  • Sign In to post your comments