Use SQL statement to query the stored procedure name a stored procedure referenced by all other stored procedures in SQL Server ...

        In project development if sometimes modify a stored procedure, but how to quickly find other stored procedures using the stored procedure do? this problem

For slightly larger scale projects, is especially important, if the database has hundreds of stored procedures, are also not find one, even if he is very understanding of the business

And systems, long time, inevitably can remember. How to use SQL statements to query it?

Here to share method in a SQL query:

select distinct name
from syscomments a,sysobjects b   
where a.id=b.id    and b.xtype='p' and text like '%pro_GetSN%'

The above section in blue font indicates the name of the stored procedure to query.

Reproduced in: https: //www.cnblogs.com/kevinGao/archive/2012/06/19/2555411.html

Guess you like

Origin blog.csdn.net/weixin_33862514/article/details/93052482