Tuesday, August 27, 2013

How do you select 10 random rows in PostgreSQL?

SELECT *
FROM <TableName>
ORDER BY RANDOM()
LIMIT 10

No comments :