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'
Grant execute on all stored procedures - SQL Server DBA
Select all SQL Server Views - SQL Server DBA
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |