To obtain a random integer in the range the range 7 : RAND : Math Numeric Functions MySQL TUTORIALS


MySQL TUTORIALS » Math Numeric Functions » RAND »

 

To obtain a random integer in the range the range 7


mysql>
mysql> SELECT FLOOR((RAND() 5));
+-------------------------+
| FLOOR((RAND() 5)) |
+-------------------------+
|                       |
+-------------------------+
row in set (0.00 sec)

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Math Numeric Functions
» RAND