USE [QPGameUserDB]
GO
/ 对象: StoredProcedure [dbo].[GSP_CF_ExchangeAccounts] 脚本日期: 07/05/2012 14:35:06 /
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
----------------------------------------------------------------------------------------------------
-- 帐号注册
CREATE PROC [dbo].[GSP_CF_ExchangeAccounts]
@strAccounts1 NVAR31), -- 用户帐号
@strAccounts2 NVAR31) -- 用户帐号
--WITH ENCRYPTION
AS
-- 属性设置
SET NOON
@UserID1 INT
@GameID1 INT
@SpreaderUser1 INT
@ProtectID1 INT
@Accounts1 NVAR32)
@LogonPass1 NVAR32)
@InsurePass1 NVAR32)
@UserID2 INT
@GameID2 INT
@SpreaderUser2 INT
@ProtectID2 INT
@Accounts2 NVAR32)
@LogonPass2 NVAR32)
@InsurePass2 NVAR32)
-- 执行逻辑
BEGIN
--获取旧信息
@UserID1=UserID,@GameID1=GameID,@SpreaderUser1=SpreaderUser, @ProtectID1=ProtectID, @Accounts1=Accounts ,@LogonPass1=LogonPass, @InsurePass1=InsurePass
FROM [QPGameUserDB].[dbo].[AccountsInfo] where [Accounts]=@strAccounts1
@UserID2=UserID,@GameID2=GameID,@SpreaderUser2=SpreaderUser, @ProtectID2=ProtectID, @Accounts2=Accounts ,@LogonPass2=LogonPass, @InsurePass2=InsurePass
FROM [QPGameUserDB].[dbo].[AccountsInfo] where [Accounts]=@strAccounts2
--修改信息
UPDATE [QPGameUserDB].[dbo].[AccountsInfo] SET GameID=1010, Accounts='1010',RegAccounts ='1010' WHERE
--交换信息
UPDATE [QPGameUserDB].[dbo].[AccountsInfo]
SET , , ,RegAccounts=@Accounts1 ,LogonPass=@LogonPass1,
WHERE
UPDATE [QPGameUserDB].[dbo].[AccountsInfo]
SET , , ,RegAccounts=@Accounts2 ,LogonPass=@LogonPass2,
WHERE
END
RETURN 0