Can't create stored procedure with table output parameter

后端 未结 2 1069
傲寒
傲寒 2020-12-03 22:08

I have this code:

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N\'[dbo].[GetProfitDeals]\') AND type in (N\'P\', N\'PC\'))
DROP PROCEDUR         


        
2条回答
  •  萌比男神i
    2020-12-03 23:06

    As Remus states, you can't do that exactly but you could accomplish what you want to achieve by using a User-Defined Function instead: tsql returning a table from a function or store procedure

    Which will return your data in a table however I believe you will need to define the table in the Function and not define it as a type

提交回复
热议问题