毒药的存储过程
毒药过程CREATE PROCEDURE RMS_INITBONUS2
@GameID varchar(14)
AS
set nocount on
begin transaction
declare @BonusLevel int
declare @Bonus int
select @BonusLevel = Lvl from tblGameID1 where GameID = @GameID
IF@BonusLevel>1000
select @BonusLevel=1000
SET @Bonus = @BonusLevel * 2 + @BonusLevel / 100
update tblGameID1 set Strength = 10, Spirit = 10, Dexterity = 10, Power = 10, Bonus = @Bonus where GameID = @GameID
update tblGameID1 set Bonus2 = 0 where GameID = @GameID AND SBonus > STotalBonus
update tblGameID1 set Bonus2 = STotalBonus - SBonus where GameID = @GameID AND STotalBonus >= SBonus
commit transaction
GO
!上向天天,习学好好
页:
[1]