当前位置: 移动技术网 > IT编程>数据库>其他数据库 > SQL查询出表、存储过程、触发器的创建时间和最后修改时间示例

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

2017年12月08日  | 移动技术网IT编程  | 我要评论
--查询建立时间 --表 select * from sysobjects where id=object_id(n'表名') and xtype='u
--查询建立时间

--表

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

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网