一个简单的存储过程

create procedure proc_pay
(@maxmoney int,
@minmoney int,
@paymonth nvarchar(20))
as 
begin
	select 储值方式,sum(台币) from 储值分析 where uid in
 (select uid from 储值分析 where Paymonth=@paymonth group by uid having sum(台币) between @minmoney and @maxmoney) group by 储值方式 
 
end

 就是C#的方法嘛

原文地址:https://www.cnblogs.com/zhanying/p/3909841.html