SQL list of all the user defined functions in a database

后端 未结 4 1273
春和景丽
春和景丽 2020-12-29 19:03

I am looking for a SQL query that outputs the function definitions for all of the user defined functions in a database catalog.

I have found as far as



        
4条回答
  •  天命终不由人
    2020-12-29 19:11

    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%'
    

提交回复
热议问题