How to create custom increment id from database

For example : A0001 - A9999

i guess that the id into a table is a matter of database not Go. anyway, you can use strings as id but is not a good practice. is better to use the native autoincrement of your database engine.

Any relational database and nosql can auto increment the ID, you not need to set it on insert.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.