ALTER PROCEDURE [dbo].[givecash]
@Cash INT,
@UserID VARCHAR(20)
AS
SET NOCOUNT ON
DECLARE @USN INT
DECLARE @nike VARCHAR(20)
select @USN = '这里输入账号USN'
select @nike = '这里输入游戏昵称'
--select UserNo = @USN2 from TAccountMst where UserNo=@USN
IF (select UserNo from TAccountMst where UserNo=@USN) IS NULL
BEGIN
INSERT INTO [TCashMst] VALUES (@USN, 'MICRO', @USN, @nike, @nike, 1, 0, 0, 0, 0, 0, 0, '0', '0', '0', 0, 0, '1990-10-10 00:00:00', 1, '0 ', '0 ', '0 ', '0 ', '2999-1-1 00:00:00', '2999-1-1 00:00:00', '0', '0', 0, '0', '2999-1-1 00:00:00', '2012-6-21 12:35:10', '0', '0', '0', '0', '0', '2999-1-1 00:00:00', '2999-1-1 00:00:00', '1/1/2999 12:00:00 AM', '0', 0, 'CF')
INSERT INTO [TAccountMst] VALUES ('MICRO', @USN, @nike, @nike, 0, 0, 0, 0, .0000, 0, 0, 0, 0, 0, 0, 1, 0, '0', 0, 0, '0', 0, '0', '0', '0', '0', '1990-10-10 00:00:00', '2012-6-21 12:35:10', 0)
END
update TAccountMst set CashReal=CashReal+@Cash, TINCashReal=TINCashReal+@Cash where UserNo=@USN;
update TCashMst set CashAmt=CashAmt+@Cash, RemainCashAmt=RemainCashAmt+@Cash where UserNo=@USN;
RETURN