how to select random rows in sql code example
Example 1: select random sql
SELECT column FROM table
ORDER BY RANDOM()
LIMIT 1
Example 2: sql pick random row
SELECT column FROM table
ORDER BY RAND()
LIMIT 1
Example 3: select random rows sql
Using a SAMPLE clause, we can select random rows.
SELECT * FROM table_name SAMPLE(10);