How to get mysql random integer range?

后端 未结 4 2108
执笔经年
执笔经年 2020-12-08 06:01

I am trying to generate a random integer for each row I select between 1 and 60 as timer.

SELECT downloads.date, products.*, (FLOOR(1 + RAND() * 60)) AS time         


        
4条回答
  •  囚心锁ツ
    2020-12-08 06:46

    I'm running your query and it does give me a random number for each row.... maybe has something to do with the name of the random (timer)?

提交回复
热议问题