Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,有人可以帮我做点什么吗?
我需要一个 mysql 查询,它可以从某个表的列中返回 4 个值,还可以从每一行中选择所有字段。
就像是:
SELECT * FROM dadoslivros WHERE RAND() =1 limit 100;
但我只想要随机表单行 ID。
谢谢。
似乎您只想使用ORDER BY RAND():
ORDER BY RAND()
select * from dadoslivros order by rand() limit 100
请参阅带有演示的 SQL Fiddle