Stored procedure question
-
How do you write a stored procedure/function that returns recordsets? Thanks Man Learns from History that he never learns from History
-
How do you write a stored procedure/function that returns recordsets? Thanks Man Learns from History that he never learns from History
-
How do you write a stored procedure/function that returns recordsets? Thanks Man Learns from History that he never learns from History
-
How do you write a stored procedure/function that returns recordsets? Thanks Man Learns from History that he never learns from History
CREATE PROCEDURE MyProcedure AS SELECT * FROM SomeTable I hope this helps. Functions are slightly different. There are three types of functions, those that return scalar value, inline table-valued functions and multi-statement table-valued function. The one that you might want is inline table-valued function CREATE FUNCTION MyFunc RETURNS TABLE AS RETURN (SELECT * FROM SomeTable WHERE SomeColumn = SomeCriteria)