ALTER TABLE `task` ADD COLUMN `taskNo`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `id`;

update task
set taskNo = concat('TASK00000', id)
where id < 10;
update task
set taskNo = concat('TASK0000', id)
where id between 10 and 99;
update task
set taskNo = concat('TASK000', id)
where id between 100 and 999;

CREATE UNIQUE INDEX `taskNo` ON `task`(`taskNo`) USING BTREE ;
