add prefix and suffiix in autoinc id in mysql?
i'm need that mysql auto increment field data is start with alpha charecters and continue..
For ex id starts with 1 mean开发者_如何学编程s i want to start that AB1, AB2, AB3,
MySQL auto increment only works with integers. You could accomplish that by other using two fields as an index or by providing your own sequence generator.
Its very easy if you are using phpmyadmin. If you are in the browser view of the table, go to the Operations tab. Here you can set it to whatever number you want though I believe if you empty the table it puts that back to 1.
Hope this helps you.
精彩评论