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
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