2

Something like:

SELECT * FROM sys.functions
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632

3 Answers3

3

for SQLServer2005 it is:

SELECT * 
    FROM sys.objects 
    WHERE type in ('TF','FN','IF') 
JBrooks
  • 9,901
  • 2
  • 28
  • 32
2

Something like this will give you all the details of the udfs you've created.

SELECT *
    FROM
        sysobjects
    WHERE
        (type = 'TF' OR type = 'FN' OR type = 'IF')
        AND
        objectproperty(id, 'IsMSShipped') = 0

Get rid of the second condition if you want everything.

jammus
  • 2,540
  • 23
  • 28
0

This will give you the names and the definitions :

SELECT SPECIFIC_NAME, ROUTINE_DEFINITION
    FROM INFORMATION_SCHEMA.ROUTINES 
WHERE ROUTINE_TYPE = 'FUNCTION'
Mongus Pong
  • 11,337
  • 9
  • 44
  • 72
  • ROUTINE_DEFINITION is not reliable. It's only nvarchar(4000), actual def is nvarchar(max) – gbn Dec 03 '09 at 18:20