SQL Server: list all user defined functions in a database

Recently I inherited a database project where many of the functions were not listed nor documented. Thankfully, with the help of the always useful stackoverflow, I was able to find the following snippet for displaying all user functions:

select name, definition, type_desc FROM sys.sql_modules m
INNER JOIN sys.objects o ON m.object_id=o.object_id
where type_desc like ‘%function%’

via sql server – SQL list of all the user defined functions in a database – Stack Overflow.

Very cool! 🙂

List of all user functions!

List of all user functions!

Top Search Terms:
  • list all functions in a database in sql (1)
  • list all functions in database (1)
  • list all functions sql database (1)
  • list all of the functions of sql (1)
  • list of user function in a databae (1)
  • sql all function (1)
  • sql server list all functions (1)
  • sqla load my user defined list of databases (1)
  • user-defined functions in sql server (1)

Leave a Reply

Your email address will not be published. Required fields are marked *