--We will now create a table valued function, which returns
the total of price filtered by a given category . Write the following code in
your query pad –
Create function fnGetProductMasters
(
@categoryId int
)
returns table
return ( select * from ProductMasters where CategoryId=@categoryId)
--The above function returns an table.
To test this function, we will write some code as shown below –
select * from dbo.fnGetProductMasters(2)
Result
Liked By
Write Answer
how to create table valued function in sql server .
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
16-Oct-2015