[Guide] Delete Guilds With No Members

ReaL

New Member
Joined
Apr 13, 2008
Messages
1,244
Reaction score
654
A simple query to delete empty Guilds (when they have only GuildMasters)!

Code:
alter table guild nocheck constraint all
alter table guildmember nocheck constraint all
delete from guild
where EXISTS (
SELECT m.G_Name,count(*) as memb from GuildMember m
where guild.g_name=m.G_name
group by m.G_Name
having count(*) <2
)

Use this at your own risk! (Cuz what if the Guild is made just yet... It will be deleted ^^)
 
  • Like
Reactions: Ivaylo99

^K1LL3R^

New Member
Joined
Apr 18, 2008
Messages
262
Reaction score
12
не е зле но тъи ще пострадат доста гуилдии ... :)
 

AfterShock

New Member
Joined
Apr 10, 2008
Messages
576
Reaction score
80
С този скрипт трябва да се внимава, защотото има герои които са "самотни" и са доста силни... решават, че не им трябват мишки в гилда и не вкарват никой.

Бях направил така в един сървър преди време и нямаше да съм приятно изненадан ако ми беше махнат гилда ;)
 
Thread starter Similar threads Forum Replies Date
ReaL [Guide] Delete never used accounts Guides 9
P [Guide] SQL Query To Delete Empty Accounts Guides 6
ReaL [Guide] Delete / Truncate MuLog Guides 15

Similar threads