From: Steffan A. Cline Date: December 28 2012 6:09am Subject: Random Code Stored Procedure List-Archive: http://lists.mysql.com/mysql/228852 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Rather than trying to reinvent the wheel, I was wondering if anyone might have a stored procedure already for what I want to do. I want to start with 4 characters using any unique combo and when all unique matches are used, it will move to 5 characters and so on. For example in any random order: AAAA AAAB ... ZZZZ AAAAA ... ZZZZZ AAAAAA ... ZZZZZZ The codes would be validated for a dupe against an existing column which this will seed called "code". Suggestions? Thanks Steffan