SELECT DISTINCT A.name, A.xtype
FROM syscomments B
INNER JOIN sysobjects A ON B.id=A.id
WHERE B.TEXT
LIKE '%Employee%'
This will show all SP, Views, Functions, Triggers related to Employee Table.
By using this SQL query we can find out all stored procedure, Views, functions, Triggers related to a Table in SQl Server.
SELECT DISTINCT A.name, A.xtype
FROM syscomments B
INNER JOIN sysobjects A ON B.id=A.id
WHERE B.TEXT
LIKE '%Employee%'
This will show all SP, Views, Functions, Triggers related to Employee Table.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegisterMembers onlyeBook · Learn .NETCSharp 13 and .NET 9 Scripting Guide (Run .cs Without Projects)Download nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.