Advertisement
thesuhu

MySQL Collation

Jan 20th, 2022
1,207
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # error Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '='
  2. # solusi, samakan collations tabel yang beda, samakan dengan collation table yang di information_chema
  3. # lihat dulu collation semua table
  4. SELECT table_schema, table_name, column_name, character_set_name, collation_name
  5. FROM information_schema.columns
  6. WHERE collation_name = 'latin1_general_ci'
  7. ORDER BY table_schema, table_name,ordinal_position;
  8. # ubah collation tabel yang dipilih
  9. ALTER TABLE tbl_name CONVERT TO CHARACTER SET latin1 COLLATE 'latin1_swedish_ci';
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement