掃二維碼與項(xiàng)目經(jīng)理溝通
我們?cè)谖⑿派?4小時(shí)期待你的聲音
解答本文疑問(wèn)/技術(shù)咨詢/運(yùn)營(yíng)咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流
下面將為您介紹SQL函數(shù)返回表的示例,供您參考,如果您在SQL函數(shù)返回表方面遇到了問(wèn)題,不妨一看,相信對(duì)您學(xué)習(xí)SQL會(huì)有所幫助。

創(chuàng)新互聯(lián)2013年至今,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站建設(shè)、做網(wǎng)站網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元雨山做網(wǎng)站,已為上家服務(wù),為雨山各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18982081108
create function [dbo].[GetOperateCustGroup]
(
@CustomerGuid varchar(36),
@StrategyOperateId varchar(36)
)
returns @TempTable table (MaxPrice float,MinPrice float,[Percent] float)
AS
begin
declare @CustomerGroupId int
select @CustomerGroupId = CustomerGroupId from T_CustGroupMember
where CustomerGuid = @CustomerGuid
set @CustomerGroupId=isnull(@CustomerGroupId,0)
insert into @TempTable
select MaxPrice,MinPrice,[Percent] from VC_T_StrategyOperateCustGroup
where CustomerGroupId = @CustomerGroupId
and StrategyOperateId=@StrategyOperateId
return
end
調(diào)用方式
SELECT * FROM [GetOperateCustGroup] ('12','22')

我們?cè)谖⑿派?4小時(shí)期待你的聲音
解答本文疑問(wèn)/技術(shù)咨詢/運(yùn)營(yíng)咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流