jeudi 9 février 2023

can I get some random data using percentage in mysql table?

I have a table, and I want to take a random data using a specific percentage like this :

enter image description here

and I'm using this to get some random data :

enter image description here

what do should I add in this sql command if I want to show random data using chance 5%, 25% & 75% ?

I want to add n% to mysql rand() and it works, everytime i run rand() code it will get the excact chance using percentage




Aucun commentaire:

Enregistrer un commentaire