Auto Increment varchar in MySQL

mysql, select, sql

Solution

NONE. So far, `AUTO_INCREMENT` can be set for `INT` only. It needs to have your own logic to do that. eg,

- Get Last ID

- Get the INT part within the string

- Increment the value

- Concatenate

- Save to DB

Problem

Is there a way to set primary key auto increment, type of varchar in mySql?

Original source

Related problems