Sqlserver 查询最新修改过的表、过程和视图等

--SELECT A.[type],A.type_desc FROM sys.objects A GROUP BY A.[type],A.type_desc

GO

DECLARE @bTime AS DATETIME

SET @bTime='2021-11-23'

--存储过程

SELECT * FROM sys.objects A WHERE A.[type]='P' AND A.modify_date>=@bTime ORDER BY A.modify_date DESC

--表

SELECT * FROM sys.objects A WHERE (A.[type]='S' OR A.[type]='IT' OR A.[type]='U') AND A.modify_date>=@bTime ORDER BY A.modify_date DESC

--函数

SELECT * FROM sys.objects A WHERE (A.[type]='FN' OR A.[type]='TF') AND A.modify_date>=@bTime ORDER BY A.modify_date DESC

--视图

SELECT * FROM sys.objects A WHERE A.[type]='V' AND A.modify_date>=@bTime ORDER BY A.modify_date DESC

 

GO

上一篇:数加使用自定义调度资源进行数据同步


下一篇:编译器定义的C/C++语言各种基本数据类型的取值范围