SQL Query to sort stored procedure on Modified date or Created Date

No.of Views1809
Bookmarked0 times
Downloads 
Votes0
By  Prajeesh   On  17 May 2010 08:05:58
Tag : Sql Servers , T-SQL
SQL Query to sort stored procedure on Modified date or Created Date
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

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

Enjoy the code snippet.

 
Sign Up to vote for this article
 
About Author
 
Prajeesh
Occupation-Not Provided
Company-Not Provided
Member Type-Fresh
Location-India
Joined date-15 May 2010
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
By:PrakashDate Of Posted:3/25/2011 4:24:07 AM
This is nice one
nice work and excellent tips.keep on
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top