create procedure insert_book @BID varchar(30), @BName varchar(50), @BPrice money, @BSumPrice money output as insert into book values(@BID,@BName,@BPrice) select @BSumPrice=sum(价格) from book go declare @total money execute insert_book '005','SQL Server 2000',400,@total outputselect @total
@BID varchar(30),
@BName varchar(50),
@BPrice money,
@BSumPrice money output
as
insert into book values(@BID,@BName,@BPrice)
select @BSumPrice=sum(价格) from book
go
declare @total money
execute insert_book '005','SQL Server 2000',400,@total outputselect @total
execute insert_book '005','SQL Server 2000',400,@total outputselect @total 给和尚抢了
--->
execute insert_book '005','SQL Server 2000',400,@total output
CSDN真是太強大了
execute insert_book '005','SQL Server 2000',400,@total output
execute insert_book '005','SQL Server 2000',400,@total out
select @total
大家都很快啊 --大家是快,我太慢,只能看有没有抢丢了什么。