12 March,2013 by Jack Vamvas
Question: How can I list all all SQL Functions in a SQL Server database?
Answer: Use the sys.objects system SQL View and the type column to choose just the Functions. Try not to use sys.sysobjects as it’s a deprecated view , to be decommissioned at some point in the future
--Method 1 --FN = SQL scalar function --FS = Assembly (CLR) scalar-function --FT = Assembly (CLR) table-valued function --AF = Aggregate function (CLR) --TF = SQL table-valued-function select [name],[TYPE] from sys.objects where type IN ('FN','FS','FT','AF','TF') order by [name] --Method 2 SELECT ROUTINE_NAME,* FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE = 'FUNCTION'