0
Posted on 8:54 AM by prajeesh and filed under
Sometimes you may need to update an online database with some stored procedure you have modified in your local system, but in most of the cases you may be confused about what are the stored procedures or tables you modified last, here is a quick solution for this.
1.Query to sort Stored Procedures on modified date.

SELECT name, create_date, modify_date,type
FROM sys.objects
WHERE type = 'P' order by modify_date desc

2.Query to sort Stored Procedures on created date

SELECT name, create_date, modify_date,type
FROM sys.objects
WHERE type = 'P' order by create_date desc

3.Query to sort user defined tables on created date

SELECT name, create_date, modify_date,type
FROM sys.objects
WHERE type = 'u' order by create_date desc

4.Query to sort user defined tables on modified date

SELECT name, create_date, modify_date,type
FROM sys.objects
WHERE type = 'u' order by modify_date desc
Shout it kick it on DotNetKicks.com
0
Responses to ... SQL Query to sort stored procedure on Modified date or Created Date