码迷,mamicode.com
首页 > 数据库 > 详细

Sql Server 中查询存储过程的修改时间

时间:2017-06-08 16:32:05      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:and   ring   触发器   sys   修改   type   line   from   nbsp   

1、按最近修改排序所有存储过程

SELECT [name], [create_date], [modify_date]
FROM [sys].[objects]
WHERE [type] = ‘P‘ -- 这里也可以替换为:‘U‘,‘IF‘,‘TR‘分别代表用户表,自定义函数,触发器
ORDER BY [modify_date] DESC
 
2、查询指定存储过程的创建及修改时间

select
[name]
,create_date
,modify_date
FROM
sys.all_objects
where
type_desc = N‘SQL_STORED_PROCEDURE‘
and name = ‘SP_SystemStatistics‘ -- 输入名称
and modify_date >=‘2016-08-05 00:00:00‘

Sql Server 中查询存储过程的修改时间

标签:and   ring   触发器   sys   修改   type   line   from   nbsp   

原文地址:http://www.cnblogs.com/lbhqq/p/6963369.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!