我是靠谱客的博主 舒适毛衣,这篇文章主要介绍SQL查询出表、存储过程、触发器的创建时间和最后修改时间,现在分享给大家,希望可以做个参考。

--查询建立时间

--表

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

最后

以上就是舒适毛衣最近收集整理的关于SQL查询出表、存储过程、触发器的创建时间和最后修改时间的全部内容,更多相关SQL查询出表、存储过程、触发器内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(170)

评论列表共有 0 条评论

立即
投稿
返回
顶部