SQL SERVER获取表在哪些存储过程中使用过

1.获取某张表在哪些存储过程中使用到

select distinct object_name(id) from syscomments where id in
(select object_id from sys.objects where type ='P') and text like'%tableName%'

2.获取某张表的创建时间

select * from sys.tables where name ='tableName '  order by create_date desc

 3.查询存储过程创建时间

select * from sys.procedures WHERE name = 'proc_name'

 

posted @ 2019-10-23 17:21  常威打来福  阅读(844)  评论(0编辑  收藏  举报