Replies: 3 comments 1 reply
-
현재 존재하는 데이터 id까지SELECT id, name
FROM tag
WHERE name COLLATE utf8mb4_bin IN (
SELECT name
FROM tag
GROUP BY name COLLATE utf8mb4_bin
HAVING COUNT(*) > 1
); |
Beta Was this translation helpful? Give feedback.
0 replies
-
중복된 태그들의 template id 조회SELECT tt.tag_id, tt.template_id, t.name
FROM template_tag tt
JOIN tag t ON tt.tag_id = t.id
WHERE t.name COLLATE utf8mb4_bin IN (
SELECT name
FROM tag
GROUP BY name COLLATE utf8mb4_bin
HAVING COUNT(*) > 1
); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
1. 이미 중복되어 있는 데이터들 조회
2. Tag 중복 제거
Tag를 가지고 있는 테이블 -> TemplateTag
TempateTag의 tag_id를 하나로 업데이트 후, 중복된 Tag 제거
3. 중복된 태그를 2개 이상 가지고 있던 Template 중복 제거
Beta Was this translation helpful? Give feedback.
All reactions