Mysql finds out two pieces of data under the condition that the self-increasing id is equal to a certain value.

Table: users, self-increment id
sql:
select id from users where id = (select floor (rand () * ((select max (id) from users)-(select min (id) from users)) + select min (id) from users))

ask for the answer of the Great God. Is there a problem with sql?

Sep.23,2021

  https://stackoverflow.com/que.

					
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36799-41059.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36799-41059.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?