samedi 29 avril 2023

How to pick a random number for a list in MySQL

I want to pick a random number from a list of integers in a MySQL Stored Procedure. This list is generated from another function using some calculations.

Example:

[41,69,9,31,10,33,13,73,20,62,21,58,22,39]

I tried the RAND() function but they are dependent on constant min, max, and step values it seems. Any help would be great.

Note: This list of numbers is not always constant, so they do not have constant min, max, or step values.




Aucun commentaire:

Enregistrer un commentaire