猿问

mysql 以自增id等于某值为条件查出两条数据

表:users,自增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))

求大神解答,是sql有问题嘛


梦里花落0921
浏览 608回答 1
1回答
随时随地看视频慕课网APP

相关分类

MySQL
我要回答