Last active
June 28, 2018 18:07
-
-
Save brazilnut2000/5337997 to your computer and use it in GitHub Desktop.
SQL: What Changed? Get a list of objects sorted by modified date.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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