MySQL Forums
Forum List  »  General

Re: ID auto increment with prefix string
Posted by: Radoslav Yankov
Date: June 28, 2013 12:51AM

Yes, I won't use exactly the same prefix but I need prefix as string and number which is automatically incremented.
I need a primary key for invoices which are automatically created and sent by the system. As we usually write another invoices manually in our company,too, we need some prexif before the number of the invoices our system creates in order not to have 2 invoices with one and the same number.
The invoices we write manually have number 1, 2, 3 and so on.
The invoices our system automatically creates should have number Some_Prefix_1, Some_Prefix_2, Some_Prefix_3 and so on.

How can I do that in SQL?



Edited 3 time(s). Last edit at 06/28/2013 02:46AM by Radoslav Yankov.

Options: ReplyQuote


Subject
Written By
Posted
Re: ID auto increment with prefix string
June 28, 2013 12:51AM


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.