MySQL Forums
Forum List  »  Newbie

Re: How to generate id number like 'xxx0000', 'xxx0001'?
Posted by: Benoit St-Jean
Date: March 29, 2017 11:36AM

Here's a hint!

SELECT CONCAT('xxx', LPAD(CONVERT(23, CHAR), 4, '0'));

Options: ReplyQuote


Subject
Written By
Posted
Re: How to generate id number like 'xxx0000', 'xxx0001'?
March 29, 2017 11:36AM


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.