Finding all The User Defined Functions (UDF) in a Database in SQL Server

This helps to find all The User Defined Functions (UDF) in a Database.

USE AdventureWorks;

GO

SELECT name AS function_name

,SCHEMA_NAME(schema_id) AS schema_name

,type_desc,type

FROM sys.all_objects

WHERE type_desc LIKE '%FUNCTION%';

GO

 

-- Except System Defined one

USE AdventureWorks;

GO

SELECT name AS function_name

,SCHEMA_NAME(schema_id) AS schema_name

,type_desc,type

FROM sys.objects

WHERE type_desc LIKE '%FUNCTION%';

GO

Thanks :)



Ebook Download
View all
Learn
View all