charset
문자 집합을 뜻하며, 각 문자 집합의 크기를 어떻게 설정할 것인지 정하는 것입니다.
collation
Collation은 text data를 정렬(ORDER BY)할 때 사용합니다.
1) utf8_bin : 대 소문자를 구분, 대소문자 구분하지 않고 검색하려면 lower, upper를 사용
2) utf8_general_ci : 대 소문자를 구분하지 않음
collation 변경방법
ALTER DATABASE [database name] CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE [table name] CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE [table name] CHANGE [column name] CHARACTER SET utf8 COLLATE utf8_bin;
'programming study > D-MySql' 카테고리의 다른 글
mysql 접속 오류(Public Key Retrieval is not allowed) (0) | 2022.12.20 |
---|---|
윈도우에서 MySQL Workbench 연결 오류 (0) | 2022.11.17 |
20220807-mysql-mybatis join on에 조건문 넣었을 때 조건 안먹는 현상.. (0) | 2022.08.07 |
20220711_mysql_with (0) | 2022.07.11 |
20220628-[MySQL]count(case when '컬럼명'=1 and exists (select문) then 1 end) as '별칭' (0) | 2022.06.28 |