0
Setting:
I have a table of users that can contain 1 or N records inside, but for example let’s assume that I have 5 records there with their respective Ids, being them: 4, 23, 59, 17, 33
Is there any function or logic in SQL
to randomly retrieve one of these predefined Ids?
I understand that could recover the Ids using the TOP
and controlling whether or not that value has already been processed. But the idea is that it is even random.
I know there’s a function ROUND() but it is not possible to generate numbers from predefined values.
Those who denied, please clarify the reason.
– Igor Carreiro