Tuesday, August 27, 2013

How do you select random rows in DB2?

SELECT *
FROM <TableName>
ORDER BY rand()
FETCH FIRST 10 ROWS ONLY;

No comments :