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