In this post, we will discuss how to return multiple values from an SQL server function in SQL server 2012
. Here my requirement is I want to return multiple values through function.
You can also check:
In this case, we have to define a Table-valued function. Below is the syntax.
ALTER function [dbo].[fnGetTags]
RETURN (SELECT TagID,TagName FROM Tags WHERE TAGID in (Select Top 1 TagID from DiscussionTags where DiscussionID= @DiscussionID))
To call this function you can use like below:
SELECT * FROM [dbo].[fnGetTags](1)
Hope this will be helpful.
You May Also like the Following SharePoint Online Tutorials:
Download FREE SharePoint 2019 Installation PDF Guide
This FREE PDF contains, Steps by step guide to install SharePoint 2019 Preview, prerequisites, hardware and software new features. First impression to SharePoint Server 2019 new modern site, modern lists and modern document libraries.