这篇文章主要介绍了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