How to return temporary table from stored procedure

前端 未结 6 1601
陌清茗
陌清茗 2020-12-15 07:31
CREATE PROCEDURE [test].[proc]
@ConfiguredContentId int,
@NumberOfGames int
AS
BEGIN
 SET NOCOUNT ON
 RETURN 
 @WunNumbers TABLE (WinNumb int)

    INSERT INTO @WunN         


        
6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 08:04

    What version of SQL Server are you using? In SQL Server 2008 you can use Table Parameters and Table Types.

    An alternative approach is to return a table variable from a user defined function but I am not a big fan of this method.

    You can find an example here

提交回复
热议问题