select name from sysobjects o,syscomments s where o.id=s.id and text like '%是否生成SN%' and o.xtype='P' --查询特定的表(字段或者文字)在哪些存储过程中被使用 SELECT DISTINCT OBJECT_NAME(id)--,text FROM syscomments WHERE id IN ( SELECT id FROM sysobjects WHERE type IN ( 'V', 'P' ,'TF') ) --V表示视图,P表示存储过程,TF表示函数 AND (text LIKE '%是否生成SN%') --查询包含某文字的列以及表 SELECT o.name as oname, C.name as cname FROM syscolumns C INNER JOIN sysobjects o ON o.id = C.id AND o.type = 'U' WHERE C.name LIKE '%是否生成SN%' OR C.name LIKE '%是否生成SN%'
标签:字符,SQLSERVR,SN%,name,--,text,视图,id From: https://www.cnblogs.com/LearningFromyou/p/17864695.html