List of Tables and Functions used in Stored Procedure

Posted by Kirthiga under Sql Server category on | Points: 40 | Views : 801
SELECT AS [Procedure Name], AS [Table & Function Name]
,ROW_NUMBER() OVER(partition by, ORDER BY, AS row
FROM sysdepends d
INNER JOIN sysobjects p ON
INNER JOIN sysobjects t ON
WHERE p.xtype = 'P'
)SELECT [Procedure Name], [Table & Function Name] FROM SP WHERE row = 1
ORDER BY [Procedure Name],[Table & Function Name]

Comments or Responses

Login to post response