Jump to content

autoincrement format


agravayne

Recommended Posts

Hello All,

 

Not sure of this is possible but I need to create a table with an autoincrement to a specific format. it shuld be 10 didgits ling and start with 03. I could just start the autoincremet at 300000000 but of course there's no leading zero. Has anyone got any ideas?

 

Scott

Well, in theory you could use ZEROFILL, but I would recommend use a normal column and then simply LPAD() it on the way out.

Link to comment
https://forums.phpfreaks.com/topic/101663-autoincrement-format/#findComment-520290
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.