Script to List Functions in a Database (Internal)

Issue:

 

Is there a way to get a listing of the functions used in a database?

 

Resolution:

The Function in a database can be listed using the SQL query below.

 

 

SELECT O.name, M.definition, O.type_desc, O.type

FROM sys.sql_modules M

INNER JOIN sys.objects O ON M.object_id=O.object_id

WHERE O.type IN ('IF','TF','FN')

Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted for approval.