语句如下:
select distinct object_name(id) from syscomments
where id in (select id from sysobjects where type ='P')
and text like '%tablname%'
在SqlServer2008中测试使用无误!其它数据库版本未考证。
本文详细介绍了如何在SqlServer2008数据库环境中,通过使用特定SQL语句,实现对特定类型(如存储过程)的ID进行筛选,并进一步过滤出包含指定字符串的程序。此操作对于数据库管理和维护具有重要作用,能有效提升数据检索效率。
语句如下:
select distinct object_name(id) from syscomments
where id in (select id from sysobjects where type ='P')
and text like '%tablname%'
在SqlServer2008中测试使用无误!其它数据库版本未考证。

被折叠的 条评论
为什么被折叠?
