ubah susunan basis data:
ALTER DATABASE <database_name> CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ubah susunan tabel:
ALTER TABLE <table_name> CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ubah susunan kolom:
ALTER TABLE <table_name> MODIFY <column_name> VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
Apa bagian dari utf8mb4_0900_ai_ci
maksudnya?
3 bytes -- utf8
4 bytes -- utf8mb4 (new)
v4.0 -- _unicode_
v5.20 -- _unicode_520_
v9.0 -- _0900_ (new)
_bin -- just compare the bits; don't consider case folding, accents, etc
_ci -- explicitly case insensitive (A=a) and implicitly accent insensitive (a=á)
_ai_ci -- explicitly case insensitive and accent insensitive
_as (etc) -- accent-sensitive (etc)
_bin -- simple, fast
_general_ci -- fails to compare multiletters; eg ss=ß, somewhat fast
... -- slower
_0900_ -- (8.0) much faster because of a rewrite
Info lebih lanjut:
- Apa perbedaan antara utf8_general_ci dan utf8_unicode_ci?
- Apa perbedaan antara utf8_general_ci dan utf8_unicode_ci?
- Cara mengubah susunan basis data , tabel, kolom?
- Apa perbedaan antara utf8_general_ci dan utf8_unicode_ci?