R ramnujs Well-known member Joined Jul 5, 2005 Messages 53 Location Philippines Programming Experience 3-5 Jul 2, 2008 #1 Can we call a stored procedure in a function and make the function return a table?
P priyanks Member Joined Apr 19, 2008 Messages 11 Programming Experience 1-3 Jul 16, 2008 #2 If you use a table function, it will return a table. For example: create function MyFunction returns @mytable table (Id int) as begin insert @mytable values(1) return end I don't think you can call a storedprocedure in a function but you can always call a function in a stored procedure. Upvote 0 Downvote
If you use a table function, it will return a table. For example: create function MyFunction returns @mytable table (Id int) as begin insert @mytable values(1) return end I don't think you can call a storedprocedure in a function but you can always call a function in a stored procedure.