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

How to Generate unique random number?

P: 12
Can someone tell me a good method for automatically placing a unique random number in a mysql database table when a new record is created.
May 20 '14 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,035
Create a trigger, and fill the field with the output of the function RAND()
May 20 '14 #2

P: 13
You may use ID fields, which database are you using?
Jun 8 '14 #3

Post your reply

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