I know there are a lot of articles about random numbers, but can't find an efficient way to do what I need.
if I have a table that is designed with an auto increment ID for each record, it would be pretty simple to get the min and the max and then get a random number between them.
But if over time, some of those records have been deleted, the more that are deleted, the more chance that I'll come up with a random number for a record that doesn't exist.
Is there an efficient way to do the random number selection so that it only returns IDs that do in fact exist in the table?
And something that will work equally as well on 100 records in the table or 100,000 records.?
thanks in advance for your feedback.
Douglas