Bu Kodu Q.A. 'dan ekleyip
EXEC CLEAR_DB Yazmanız Yeterli Olacaktır.
Kod:
/* Created by Thales */
CREATE PROCEDURE CLEAR_DB
AS
TRUNCATE TABLE ACCOUNT_CHAR
TRUNCATE TABLE CURRENTUSER
TRUNCATE TABLE DELETED_ACCOUNT_CHAR
TRUNCATE TABLE DELETED_USERDATA
TRUNCATE TABLE DELETED_WAREHOUSE
TRUNCATE TABLE DELLOS_TAX
TRUNCATE TABLE ELMO_RANK
TRUNCATE TABLE KARUS_RANK
TRUNCATE TABLE FRIEND_LIST
TRUNCATE TABLE HACKTOOL_USERLOG
TRUNCATE TABLE HERO_USER
--TRUNCATE TABLE itemler
TRUNCATE TABLE KING_BALLOT_BOX
TRUNCATE TABLE KING_ELECTION_LIST
TRUNCATE TABLE KNIGHTS
TRUNCATE TABLE KNIGHTS_ALLIANCE
TRUNCATE TABLE KNIGHTS_RATING
TRUNCATE TABLE KNIGHTS_USER
TRUNCATE TABLE PREMIUM_SERVICE
TRUNCATE TABLE RENTAL_ITEM
TRUNCATE TABLE RENTAL_ITEM_LIST
TRUNCATE TABLE TB_USER
TRUNCATE TABLE USER_EDITOR
TRUNCATE TABLE USER_EDITOR_ITEM
TRUNCATE TABLE USER_MANNERPOINT_RANK
TRUNCATE TABLE USER_RENTAL_ITEM
TRUNCATE TABLE USER_SAVED_MAGIC
TRUNCATE TABLE USERDATA
TRUNCATE TABLE USERDATA_SKILLSHORTCUT
TRUNCATE TABLE WAREHOUSE
UPDATE KNIGHTS_SIEGE_WARFARE SET sMasterKnights = 0
UPDATE KING_SYSTEM SET strKingName = '', byType = '', byTerritoryTariff = 0, nTerritoryTax = 0, nNationalTreasury = 0
UPDATE KING_CANDIDACY_NOTICE_BOARD SET strUserID = ''
UPDATE USER_KNIGHTS_RANK SET strElmoUserID = NULL, strElmoKnightsName = NULL, nElmoLoyalty = 0, strKarusUserID = NULL, strKarusKnightsName = NULL, nKarusLoyalty = 0
PRINT 'Database has been cleaned.'
PRINT 'Created by Thales'
GO