Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in MySQL only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
MySQL
How to Generate unique random number?
How to Generate unique random number?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
mgdvicky
New Member
Join Date:
Feb 2014
Posts:
12
#1
How to Generate unique random number?
May 20 '14, 05:40 AM
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.
Luuk
Recognized Expert
Top Contributor
Join Date:
Mar 2012
Posts:
1043
#2
May 20 '14, 06:58 PM
Create a
trigger
, and fill the field with the output of the function
RAND()
Comment
Post
Cancel
mHealth
New Member
Join Date:
Jun 2014
Posts:
13
#3
Jun 8 '14, 03:58 PM
You may use ID fields, which database are you using?
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment