Thursday, February 14, 2013

How many types of function in SQL Server ?

Posted by Rahul Kharde at 1:40 AM
There are three types of UDF
  • Scalar function
  • In-line function
  • Multi-statement functions.


Sclare Function

Scalar UDFs return a single value. They are similar to built-in functions such as DB_NAME(), GETDATE(), or USER_ID(), which return a single string, date, or integer

Inline Function

In-line UDFs return a single row or multiple rows and can contain a single SELECT statement. Because in-line UDFs are limited to a single SELECT, they can't contain much logic

Multi-Statement Function

Multi-statement UDFs can contain any number of statements that populate the table variable to be returned. Notice that although you can use INSERT, UPDATE, and DELETE statements against the table variable being returned, a function cannot modify data in permanent tables


If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!


Kindly Bookmark and Share it:

YOUR ADSENSE CODE GOES HERE

0 comments:

Have any question? Feel Free To Post Below:

 

Popular Posts

Recent Comments

© 2011. All Rights Reserved | Help to understand .Net | Template by Blogger Widgets

Home | About | Top