By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,104 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

Write a Check Digit in mysql

P: 3
How would you write a check digit in MySQL if you want to generate a random number that exists only out of 6 digits and then generates a check digit?
Sep 21 '11 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,364
That depends on what algorithm you want to use. A simple one is to add all the digits and then mod 10.
Sep 21 '11 #2

P: 3
If you would write a small procedure to give me one 6 digit number and add a check digit? I'm new to this scene of MySQL, please can you help? Thanks!
Sep 22 '11 #3

Expert Mod 10K+
P: 12,364
Sorry, that's not how I do things. I don't just give out the answer. I like the poster to make an attempt at the problem and then I help them work through the issues they run into with their implementation.
Sep 22 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.