use QPAccountsDB

go

/* 向TabNickName中插入昵称数据 */

DECLARE @NICK NVARCHAR(50)

DECLARE cur_nick cursor for select nick from nick_new;

BEGIN

OPEN cur_nick ;

FETCH NEXT FROM cur_nick INTO @NICK;

WHILE @@FETCH_STATUS = 0

棋牌游戏修改机器人昵称数据脚本 棋牌游戏 棋牌技术  第1张

BEGIN

INSERT INTO TabNickName(nickname) values (@NICK);

FETCH NEXT FROM cur_nick INTO @NICK;

END

--关闭游标

CLOSE cur_nick;

--释放游标

DEALLOCATE cur_nick;

END

/* 更新机器人昵称 */

DECLARE @id INT,

@NICK NVARCHAR(50)

DECLARE cur_nick cursor for select ID,nickname from TabNickName;

BEGIN

OPEN cur_nick ;

FETCH NEXT FROM cur_nick INTO @id,@NICK;

WHILE @@FETCH_STATUS = 0

BEGIN

UPDATE AccountsInfo SET NickName=@NICK WHERE UserID=@id;

FETCH NEXT FROM cur_nick INTO @id,@NICK;

END

--关闭游标

CLOSE cur_nick;

--释放游标

DEALLOCATE cur_nick;

END

SELECT * FROM AccountsInfo WHERE NickName LIKE '%机器人%'

GO

--

UPDATE AccountsInfo SET IsAndroid=1 WHERE Accounts LIKE '%机器人%'

GO

/*

UPDATE AccountsInfo SET

Accounts=Accounts+'-'+FLOOR(RAND(DATEDIFF(SECOND,'1970-01-01 08:00:00.000',GETDATE()))*100000000)

WHERE Accounts LIKE '%机器人'

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

棋牌游戏修改机器人昵称数据脚本 棋牌游戏 棋牌技术  第2张

GO

DECLARE @SEC BIGINT

SELECT FLOOR(RAND(DATEDIFF(SECOND,'1970-01-01 08:00:00.000',GETDATE()))*100000000)

*/

未经允许不得转载! 作者:棋牌源码网,转载或复制请以超链接形式并注明出处棋牌源码网

原文地址:《棋牌游戏修改机器人昵称数据脚本》发布于:2021-08-09