MySQL Forums
Forum List  »  Newbie

How to add a prefix to a auto increment field
Posted by: Mohammed Shakeeb
Date: April 08, 2010 01:10AM

Dear all,

I have one query and like to discuss with u all and in finding a solution for it,

I have student table in which "stud_id" field is a PK and auto increment, so this field gets incremented like 1, 2, 3, 4........... as and when adding new students.

My requirement is I want to add a prefix to the "stud_id" like abc1, abc2, abc3, abc4......... instead of just 1,2,3,4........

I tried a lot but no success, so thought of posting it here, can any one help me out with this????????


Thanks & Regards
Developer

Options: ReplyQuote


Subject
Written By
Posted
How to add a prefix to a auto increment field
April 08, 2010 01:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.