Skip to content

Instantly share code, notes, and snippets.

@brazilnut2000
Last active June 28, 2018 18:07
Show Gist options
  • Save brazilnut2000/5337997 to your computer and use it in GitHub Desktop.
Save brazilnut2000/5337997 to your computer and use it in GitHub Desktop.
SQL: What Changed? Get a list of objects sorted by modified date.
/*
* Get a list of objects sorted by modified date.
* Allows you to quickly identify what has been
* added or changed.
*/
SELECT
modify_date, OBJECT_NAME(object_id ) 'Stored Procedure' , *
FROM
sys.procedures
order by 1 desc
SELECT
modify_date, OBJECT_NAME(object_id ) 'Table' , *
FROM
sys.tables
order by 1 desc
SELECT
modify_date, OBJECT_NAME(object_id ) 'Trigger' , *
FROM
sys.triggers
order by 1 desc
SELECT
modify_date, OBJECT_NAME(object_id ) 'View' , *
FROM
sys.views
order by 1 desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment