Posted By

hojgaard on 02/23/12


sql table stored procedure functions last modified views

Versions (?)

Last modified

 / Published in: SQL

Lists when tables, stored procedure, views and functions where last modified. Shows only modified items within the last 14 days.

  1. SELECT name Name, type_desc [Type], modify_date Modified
  2. FROM sys.objects
  3. WHERE type IN ('P', 'U', 'V', 'FN')
  4. AND DATEDIFF(D, modify_date, GETDATE()) < 14
  5. ORDER BY type_desc, modify_date DESC

Report this snippet  

You need to login to post a comment.