forked from edi100/patch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path21
More file actions
25 lines (17 loc) · 1.04 KB
/
21
File metadata and controls
25 lines (17 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
DELETE FROM `table2` WHERE `id` NOT IN (SELECT `id` FROM `table1`);
DELETE FROM `creature_template1` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_template2`);
DELETE FROM `creature_template2` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_template1`);
DELETE FROM `gameobject_template1` WHERE `entry` NOT IN (SELECT `entry` FROM `gameobject_template2`);
DELETE FROM `gameobject_template2` WHERE `entry` NOT IN (SELECT `entry` FROM `gameobject_template1`);
UPDATE creature_template1 SET subname = NULL WHERE subname = '0';
UPDATE creature_template1 SET IconName = NULL WHERE IconName = '0';
DELETE FROM `creature_model_info1` WHERE `modelid` NOT IN (SELECT `modelid1` FROM `creature_template1`);
DELETE FROM `creature_template1` WHERE `modelid1` NOT IN (SELECT `modelid` FROM `creature_model_info1`);
SELECT entry, modelid1 from `creature_template` WHERE `modelid1` NOT IN (SELECT `modelid` FROM `creature_model_info`);
SELECT
table1.name,
table1.id,
table2.class
FROM table1
LEFT OUTER JOIN table2
ON table1.id = table2.id