Wednesday, November 16, 2011

How to find the table used in the stored procedure?


Method 1 : SELECT OBJECT_NAME(id) FROM SYSCOMMENTS S
INNER JOIN SYS.OBJECTS O ON O.Object_Id = S.id
WHERE S.text LIKE ‘%Products%’
AND O.type=’P’