Two-step implementation of mysql to generate non-repeating id sequentially
This article mainly introduces you two steps to achieve mysql in order to generate non-repetitive id, the content of the article is carefully selected and edited by the author, with a certain pertinence, and is of great significance to everyone's reference, the following is to understand with the author that the next two steps are to achieve mysql in order to generate non-repetitive id.
Non-letter and non-zero start generate a non-repeating idselect case when max (id) is null then '10000001' else max (id) + 1 end as id from student; letter start to generate a non-repeating id sequentially
Select case when max (id) is null then 'S10000001' else CONCAT (' max (id), 2) end as id from student
After reading the above about the two-step implementation of mysql in order to generate non-repetitive id, many readers must have some understanding. If you need to get more industry knowledge and information, you can continue to follow our industry information column.