Thursday, 25 October 2012


SQL Server Get Created, Last Modified date of Stored Procedure or Table



Introduction:

In this article  will explain how to find or get last modified date and created date of stored procedure or table in sql server


To get created date or last modified date of stored procedure we need to write the query like this


SELECT name,type,type_desc,create_date,modify_date FROM sys.objects
WHERE type = 'P' AND name = 'YourProcedureName'

Here if you observe above query I mentioned type = 'P' this mean to identify stored procedure or table or function etc based on 'P','U','FN',etc…


Here type = 'P'   (Procedure)
        type = 'U'  (User Table)
        type = 'S'  (System Table)
        type = 'PK' (Primary Key)
        type = 'FN' (Scalar Function)

Suppose if we want to get modified or created date of table we need to mention type = 'U' and the query will be like this


SELECT name,type,type_desc,create_date,modify_date FROM sys.objects
WHERE type = 'U' AND name = 'YourTableName'

Example:


SELECT name,[type],type_desc,create_date,modify_date FROM sys.objects
WHERE [type] = 'P' AND name = 'GetUserDetails'

Output:


SharePoint tenant opt-out for modern lists is retiring in 2019

We're making some changes to how environments can opt out of modern lists in SharePoint. Starting April 1, 2019, we're going to be...