Subscribe

SQLServer-DBA.com Links

Subscribe to newsletter

Dba_db2_button

Powered by TypePad
Select all SQL Server Functions

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'

 Read More

Grant execute on all stored procedures - SQL Server DBA

Select all SQL Server Views - SQL Server DBA


Author: Jack Vamvas (http://www.sqlserver-dba.com)

******** *******

Subscribe to SQLServer-DBA.com

Latest posts delivered to you daily

Delivered by FeedBurner

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

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.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer