vendredi 11 mai 2018

MySQL select Random whole number

I want to create a mysql query where I pick one random number between two values including those values (1 and 5 in my example below) and that random value forms part of my where clause. How can this be done.

My code is below for my attempt at this:

SELECT * WHERE Col7 = (RAND()*(5-1+1)+1)




Aucun commentaire:

Enregistrer un commentaire