Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Selecting a random record (libSQL SQLite) - Drizzle Team
DT
Drizzle Team
•
2y ago
•
3 replies
danfascia
Selecting a random record (libSQL SQLite)
I have a table of questions and I would like to select a single random record to create a quiz
.
In raw SQL I would use
SELECT * FROM questions ORDER BY RANDOM() LIMIT(1)
SELECT * FROM questions ORDER BY RANDOM() LIMIT(1)
I have no idea how to model this into a drizzle query as there only seem to be asc and desc methods on orderBy
- I am using libSQL
Thanks
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
libSQL/SQLite: Issue with CAST and ILIKE
DT
Drizzle Team / help
2y ago
strange libsql error when doing push:sqlite
DT
Drizzle Team / help
3y ago
Generate Random UUID Sqlite
DT
Drizzle Team / help
3y ago
Deno + libSQL
DT
Drizzle Team / help
10mo ago