欢迎光临
我们一直在努力

SQL查询出表、存储过程、触发器的创建时间和最后修改时间示例

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--查询建立时间
 
--表
 
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\'dqtx\') and xtype=\'P\'
 
 
 
--查询最后修改时间
 
--存储过程
 
select name,modify_date from sys.all_objects where name = \'存储过程\' and type=\'P\' order by modify_date desc
 
--触发器
 
select name,modify_date from sys.all_objects where name = \'存储过程\' and type=\'TR\' order by modify_date desc
 
--表
 
select * from sys.all_objects where name = \'存储过程\' and type=\'u\' order by modify_date desc

赞(0) 打赏
主机商所有内容均来自网络,若无意侵犯到您的权利,请及时与联系 QQ 2232175042,将在48小时内删除相关内容!!主机测评网 » SQL查询出表、存储过程、触发器的创建时间和最后修改时间示例

主机商评测网 找服务器 更专业 更方便 更快捷!

专注IDC行业资源共享发布,给大家带来方便快捷的资源查找平台!

联系我们

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫