开发者

Starting the AUTO_INCREMENT with zero

I need some help with MySQL. I have id col开发者_JAVA百科umn on my news table with AUTO_INCREMENT and as usually it assign id=1 for the very first news, id=2 for the second and etc. But I want it to start with 001 instead of 1, then 002,003 and so. How can I do that?


Use a numeric field and set the field to ZEROFILL. More on how to use ZEROFILL here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜