根据关键字查询存储或表

--根据关键字查询SP
select distinct a.name from sysobjects a,syscomments b where a.id=b.id and a.xtype='P' and b.text like '%XXXXX%' order by name
--根据列名查询table
SELECT a.name AS TableName,b.Name,b.[length] FROM sysobjects a ,syscolumns b WHERE a.id=b.id AND a.type='u' AND b.name LIKE '%XXXXX%' 

 

posted @ 2017-05-31 10:47  芈璐  阅读(211)  评论(0编辑  收藏  举报