Last active
August 20, 2019 11:13
-
-
Save kphrx/227bc086222dc22735dfbeb70557a6da to your computer and use it in GitHub Desktop.
MyFleetGirls Delete Old Version Resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM map_image_2nd | |
WHERE EXISTS ( | |
SELECT 1 | |
FROM map_image_2nd AS m | |
WHERE map_image_2nd.area_id = m.area_id | |
AND map_image_2nd.info_no = m.info_no | |
AND map_image_2nd.suffix = m.suffix | |
AND map_image_2nd.version < m.version | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM ship_image | |
WHERE EXISTS ( | |
SELECT 1 | |
FROM ship_image AS s | |
WHERE ship_image.id = s.id | |
AND ship_image.version < s.version | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM ship_image_2nd | |
WHERE EXISTS ( | |
SELECT 1 | |
FROM ship_image_2nd AS s | |
WHERE ship_image_2nd.id = s.id | |
AND ship_image_2nd.kind = s.kind | |
AND ship_image_2nd.version < s.version | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM ship_sound | |
WHERE EXISTS ( | |
SELECT 1 | |
FROM ship_sound AS s | |
WHERE ship_sound.ship_id = s.ship_id | |
AND ship_sound.sound_id = s.sound_id | |
AND ship_sound.version < s.version | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment