如何获取给定数据库中最近10天更改的列表 [英] How to get List of last 10 days changes in given database
本文介绍了如何获取给定数据库中最近10天更改的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在给定的数据库中获得最近10天的更改.
我想要这些对象的名称,对象的类型(触发器,表,存储过程等)以及这些对象的创建日期和修改日期.
I want to get last 10 days changes in given database.
I want name of these object name, type of object (trigger,table,storedprocedure etc.) and creation date and modify date of these objects.
推荐答案
SELECT name AS object_name
,SCHEMA_NAME(schema_id) AS schema_name
,type_desc
,create_date
,modify_date
FROM sys.objects
WHERE modify_date > GETDATE() - 10
ORDER BY modify_date
使用此代码将使工作更加顺利
use this code it will surre work
这篇关于如何获取给定数据库中最近10天更改的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文