DB2 Random Row Selection
Posted Sep 14, 2005 12:32:00 PM
Pete posted earlier about selecting a single random row from various different types of database. I just wanted to follow up with the query to do this in IBM's DB2 (tested on 8.2)
SELECT * FROM <table> ORDER BY RAND() FETCH FIRST 1 ROWS ONLY
add to del.icio.us