现在的位置: 首页 > 综合 > 正文

SQL查询表和存储过程创建修改日期

2012年08月13日 ⁄ 综合 ⁄ 共 484字 ⁄ 字号 评论关闭

 

查询建立时间 

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

 

抱歉!评论已关闭.