« Return to Thread: auto increment primary key format question

Re: auto increment primary key format question

by Ronald Klop :: Rate this Message:

Reply to Author | View in Thread

There is a ZEROFILL option in mysql.
Then retreive your value with getString().

I didn't test this, but I think it should be the way to do it.

(In the end this is a presentation issue and not a data issue, so you could also fix in the presentation layer
Ronald.

On Sun Aug 26 02:48:15 CEST 2007 javaNoob <noypi_baller@...> wrote:

>
> i have a primary key that is auto increment. how do i make it 10 digits long?
>
> example: instead of '23', i want it to be '0000000023'
> --
> View this message in context: http://www.nabble.com/auto-increment-primary-key-format-question-tf4329657.html#a12331099
> Sent from the MySQL - Java mailing list archive at Nabble.com.
>
>
> --
> MySQL Java Mailing List
> For list archives: http://lists.mysql.com/java
> To unsubscribe: http://lists.mysql.com/java?unsub=ronald-mailinglist@...
>

 « Return to Thread: auto increment primary key format question