I hope this comes accross:
I need to set up a MySql database which will then be exported to a text file. In the text file I need values such as B000000, ie B and 6 digits whereby the numbers are created with auto_increment as used for an id column.
So the result should look like this:
B000001
B000002
.
.
.
B000255
etc
When you do your dump do you have the ability to dump a specific query? Or a table?
You could create a special table which uses a VARCHAR field and then you do something like this:
SELECT 'B' + auto_increment_column, ...
FROM old_table
INTO new_table
I thought about this and creating a new table would for sure work. The problem though are the required 6 digits, or can you set an auto_increment numneric column to have a default layout of 6 digits, ie 000000?
Bookmarks