set @a = 'test1';
delete FROM `character_config` where object_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_buff` where char_obj_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_config` where object_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_items` where char_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_items` where char_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_quests` where char_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_skills` where char_obj_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_teleport` where char_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_warehouse` where account_name = @a;
delete FROM `characters` where characters.account_name = (select login from accounts where login = @a);
delete FROM `character_config` where object_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_buff` where char_obj_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_config` where object_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_items` where char_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_items` where char_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_quests` where char_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_skills` where char_obj_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_teleport` where char_id in (select objid from characters where characters.account_name = @a);
delete FROM `character_warehouse` where account_name = @a;
delete FROM `characters` where characters.account_name = (select login from accounts where login = @a);