This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes how to auto generate primary key? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "how to auto generate primary key? " Watch "how to auto generate primary key? " New topic

how to auto generate primary key?

kahkean chor
Ranch Hand

Joined: Jan 26, 2013
Posts: 67
i am using mysql, i would like to auto generate the primary like this....


follow by "cus"
can anyone help me?thanks in advanced
James Boswell

Joined: Nov 09, 2011
Posts: 1051

Do you have a requirement to generate the primary key this way?
I agree. Here's the link:
subject: how to auto generate primary key?
It's not a secret anymore!