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.
如何进行查询以获取限制为 3 行的 random() 行?
我试过但得到错误:
myQueryBuilder.orderBy("random()", true);
我通过使用以下orderByRaw(...)方法解决了它:
orderByRaw(...)
myQueryBuilder.orderByRaw("RANDOM()");