Pranay Rana: query to seaarch out the table and sps and table name in stored procedure

Wednesday, October 7, 2009

query to seaarch out the table and sps and table name in stored procedure

SELECT * FROM sysobjects o WHERE (o.xtype = 'P') ORDER BY o.name

--Select * from sysobjects where type = 'U' and category = 0

select

so
.name,

sc
.text

from

sysobjects so
inner join syscomments sc on so.id = sc.id

where

sc
.text like '%ROLES%'

and sc.text like '%select%'

-- or sc.text like '%WorkGroup%'

No comments:

Post a Comment