Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20210413] MySQL 다른 charset 조인 #96

Open
JuHyun419 opened this issue Apr 13, 2021 · 0 comments
Open

[20210413] MySQL 다른 charset 조인 #96

JuHyun419 opened this issue Apr 13, 2021 · 0 comments
Labels

Comments

@JuHyun419
Copy link
Owner

MySQL - DB에서 다른 charset 설정의 두 컬럼 조인

  • 같은 DB에서 테이블의 charset이 utf8이지만 세부 charset이 다른 경우, 두 컬럼을 조인하면 오류가 발생한다.
  • 세부 charset: utf8_general_ci, utf8_unicode_ci
  • table의 charset을 변경해주거나, 조인할 때 쿼리에서 charset을 변환한다.
~ JOIN
TEST n ON m.ID  = n.ID
SQL Error [1267] [HY000]: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='


// 아래와 같이 coallte 명령어로 강제로 변환한다.
~ JOIN
TEST n ON m.ID COLLATE utf8_unicode_ci  = n.ID 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant