- 2
- 0
- 约小于1千字
- 约 20页
- 2018-01-18 发布于江苏
- 举报
数据库练习 PPT
;;;;;;;;;;;;;create proc find_salers_A @start_date datetime,@end_date datetime as declare @sum_total numeric(10,2), @sum_every numeric(10,2),@ssid char(4)
select sid,sum(sqty* price) as salesum into #temp1 from sell_log
where sdate= @start_date and sdate =@end_date group by sid
select @sum_total =sum(salesum) from #temp1
declare find_cursor cursor for select sid,salesum from #temp1
open find_cursor
fetch next from find_cursor into @ssid, @sum_every
while @@fetch_status=0
;;;
原创力文档

文档评论(0)