Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > ASP


Thread Tools Rate Thread Display Modes
Old 12-12-2016, 11:47 PM   #1
Registered User
Join Date: Dec 2013
Location: Banglore
Posts: 336
Send a message via AIM to chinmay.sahoo Send a message via MSN to chinmay.sahoo
Arrow What is an In Line Table User Defined Function in SQL Server?

• Returns a row set of the SQL Server table data type.

• Takes the structure of the row set from the SELECT statement itself.

• It is an exceptional alternative to a view

• Can pass parameters and in essence provide us with a parameterized, non-updateable view

Fat Cutter | Hot Shaper | Asthijivak | Roop Amrit |
chinmay.sahoo is offline   Reply With Quote

Old 03-16-2017, 12:28 AM   #2
Registered User
Join Date: Jan 2017
Location: Ahmedabad
Posts: 126

User Defined Functions play an important role in SQL Server. User Defined functions can be used to perform a complex logic, can accept parameters and return data. Many a times we have to write complex logic which cannot be written using a single query. In such scenarios, UDFs play an important role. For example, we can call user defined function in a where clause or use a user defined function in a JOIN [Where UDF returns a result set].

SQL Server supports two types of User Defined Functions as mentioned below –

- Scalar Functions – The function which returns a Scalar/Single value.

- Table Valued Functions – The function which returns a row set of SQL server Table datatype. Table Valued Functions can be written as –
Inline Table

Multi-statement Table
We will explore these functions today. I am using SQL Server 2012 for this demonstration, although you can use SQL Server 2005, 2008, 2008 R2 as well.

I have preconfigured Northwind database on my SQL Server instance. We will be using the following tables for creating different User Defined Functions –
1) Customers
2) Employees
3) Orders
4) Order Details
5) Products

Sonvi Belani
Ecommerce Website Developer
custom software companies India
ASP.NET software companies India
sonvi.belani is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post Dedicated Servers - 24/7 Customer Support, 99.99% Server Uptime OurInternet Post your ad here 2 10-14-2015 02:04 AM
Windows Hosting on IIS 8 Server with Free SQL 2012 Database thewebhosting Web Promotion 1 04-04-2013 08:53 AM
bodHOST - Managed Load-balancing / Server Mirroring Solutions 10% Discount Hosting Advisor Post your ad here 0 10-25-2012 09:10 AM
$10 off every server FOR LIFE: plus 1st month free on many servers Webcs-Peter Post your ad here 0 05-17-2012 11:53 PM
Dedicated servers from Zeropid: your fast and reliable dedicated server solution zeropid Post your ad here 0 02-03-2012 12:14 AM

All times are GMT -7. The time now is 12:42 PM.

Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.