Sample Header Ad - 728x90

CONVERT TO CHARACTER SET isnt working with modify column

1 vote
1 answer
61 views
I am trying to convert the table charset and collation along side preserving some of the columns explicit charset and collation. I need to do it in single alter statement. If i use following, it is changing the charset of the column which i want to retain. Any idea if something is missing? query 1- ALTER TABLE summary CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci , MODIFY COLUMN summary_id varchar(11) CHARACTER SET ascii COLLATE ascii_bin NOT NULL; Show create table o/p: Create Table: CREATE TABLE "summary" ( “summary_id" varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
Asked by DTdev (111 rep)
Mar 18, 2025, 09:14 AM
Last activity: Mar 18, 2025, 01:53 PM