SQLite RANDOM() Function
Definition and Usage
The RANDOM() function returns a random integer between -9223372036854775808 and 9223372036854775807.
Tip: Also look at RANDOMBLOB().
Syntax
RANDOM()
Technical Details
| Return type: | Integer |
|---|
More Examples
Example
Select three random products:
SELECT * FROM Products
ORDER BY RANDOM()
LIMIT 3;
Try it Yourself »