Calling stored procedure in a function..

ramnujs

Well-known member
Joined
Jul 5, 2005
Messages
53
Location
Philippines
Programming Experience
3-5
Can we call a stored procedure in a function and make the function return a table?
 
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.
 
Back
Top