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