新聞中心
下面將為您介紹SQL函數(shù)返回表的示例,供您參考,如果您在SQL函數(shù)返回表方面遇到了問題,不妨一看,相信對您學(xué)習(xí)SQL會有所幫助。

創(chuàng)新互聯(lián)2013年至今,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項目成都網(wǎng)站建設(shè)、做網(wǎng)站網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元雨山做網(wǎng)站,已為上家服務(wù),為雨山各地企業(yè)和個人服務(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')
網(wǎng)站名稱:SQL函數(shù)返回表的示例
分享路徑:http://www.dlmjj.cn/article/djidddp.html


咨詢
建站咨詢
