传奇3删除垃圾数据SQL脚本
DECLARE @username char(15)DECLARE D_lj_cursor CURSOR FOR
SELECT FROM ..
WHERE =1 OR (<21 AND FLD_UPDATEDATETIME < ’2004 - 9 - 14’)
OPEN D_lj_cursor
FETCH NEXT FROM D_lj_cursor INTO @username
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT ’正在删除 ’+@username+’ 的相关资料......’
DELETE FROM .. WHERE = @username
DELETE FROM .. WHERE = @username
DELETE FROM .. WHERE = @username
DELETE FROM .. WHERE = @username
DELETE FROM .. WHERE = @username
DELETE FROM .. WHERE = @username
DELETE FROM .. WHERE = @username
DELETE FROM .. WHERE = @username
DELETE FROM .. WHERE = @username
FETCH NEXT FROM D_lj_cursor INTO @username
END
CLOSE D_lj_cursor
DEALLOCATE D_lj_cursor
===================================
注意:使用前备份你game1的数据库,这个脚本是将已被用户删除的人物 且 2004年9月14日前没到21级的人物全部删除。
=1 OR (<21 AND FLD_UPDATEDATETIME < ’2004 - 9 - 14’)
上面这段就是控制时间等级的。 21和2004-9-14 。自行修改适合自己的就可以了。
===================================
不会用SQL查询分析器,请自行查找应用教程或说明。
真是难得给力的帖子啊。 太生气了,无法HOLD啦 >_<...... 感恩无私的分享与奉献 :) 真是被感动的痛哭流涕…… 看到这帖子真是高兴! 我只是路过打酱油的。 无回帖,不论坛,这才是人道。 淡定,淡定,淡定…… 无回帖,不论坛,这才是人道。
页:
[1]
2