--查询建立时间
select * from sysobjects where id=object_id(N'表名') and xtype='U' --表
select * from syscolumns where id=object_id(N'表名') --表的结构
select * from sysobjects where id=object_id(N'存储过程名') and xtype='P' --存储过程
--查询最后修改时间
DECLARE @UpDateTime datetime
set @UpDateTime='2014-11-27'
select name,modify_date from sys.all_objects where type='P' and modify_date>@UpDateTime --存储过程
select name,modify_date from sys.all_objects where type='u' and modify_date>@UpDateTime --表
select name,modify_date from sys.all_objects where type='TR' and modify_date>@UpDateTime --触发器
查看数据最后修改时间,建立时间
最新推荐文章于 2023-07-19 00:42:47 发布