How to return multiple value from function in sql ?
Answers (1)
Add AnswerIn general, SQL Server functions return just one parameter value. If we wish to return several values from a function, we must deliver numerous values in table format utilizing table-valued functions.
CREATE FUNCTION Testmultiplevalues (@UserId INT) returns TABLE AS RETURN (SELECT * FROM userinformation WHERE userid = @userId)