User Defined Function or UDF in SQL Server 2005.

Sunday, March 22, 2009 |

User Defined Functions was first introduced in Microsoft SQL Server 2000 and it was not became very popular in starting period but over a period people found that it is useful in implementing difficult logic and sometime answer of cursor. You can use UDF with SELECT statement in FROM clause like we used to do with VIEW in SQL Server. It is totally proprietary format so it may be difficult to use it in other DATABASE in different platform.


There are mainly three types of functions available in Microsoft SQL Server 2005 Scalar function which used to return only single value, updateable inline function and Multi-statement table function.


Microsoft has introduced two new features in Functions. CLR functions and Table valued functions.


I will come up with examples of Functions in my next few articles.


Reference: Ritesh Shah
http://www.SQLHub.Com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of http://www.SQLHub.com

0 comments: