首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

查询存储过程,数据库对象的创办历史

2013-11-02 
查询存储过程,数据库对象的创建历史查询建立时间--表select * from sysobjects where idobject_id(N表名

查询存储过程,数据库对象的创建历史
查询建立时间

--表
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'  

查询最后修改时间

--存储过程
select name,modify_date from sys.all_objects where type='P' order by modify_date desc
--触发器
select name,modify_date from sys.all_objects where type='TR' order by modify_date desc
--表
select * from sys.all_objects where type='u' order by modify_date desc

热点排行