I'm planning to convert a table from
utf8mb4_unicode_ci). I want to make sure I don't have any malformed data after the conversion though so I was planning to duplicate the data, run a join on the two tables, and see if there are any differences.
Is this a good way to go about it?
Create table Email_utf8mb4 like Email;
insert into Email_utf8mb4 select * from Email;
ALTER TABLE Email_utf8mb4 CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
select * from Email as old join Email_utf8mb4 as new on old.notificationid =new.notificationid and (old.subject <> new.subject OR old.content <> new.content)
4.5. Assuming no rows are returned...
RENAME TABLE Email_utf8mb4 to Email;
content are the only alpha columns in my table.