I have written the following query in Mysql:
SELECT distinct LPAD(FLOOR(RAND() * 999999999),9,0) AS random_num FROM test;
If I have say 100000 records in my table test, then will this query always give me 100000 distinct numbers? If not, why?
Aucun commentaire:
Enregistrer un commentaire