网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   MySQL (https://www.0058.net/forumdisplay.php?f=76)
-   -   Mysql如何用rand()生成随机数? (https://www.0058.net/showthread.php?t=4864)

Radnor 2014-11-26 04:59 PM

Mysql如何用rand()生成随机数?
 
ceil(rand()*10); 生成1位随机数
ceil(rand()*100);生成2位随机数
ceil(rand()*1000);生成3位随机数
ceil(rand()*10000);生成4位随机数
ceil(rand()*100000);生成5位随机数
ceil(rand()*1000000);生成6随机数


All times are GMT +8. The time now is 10:38 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.