Posted By

jordantbro on 01/21/09


Tagged

db2 IBM


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Plastyksouljah


Selecting a Random Row In IBM DB2


 / Published in: SQL
 

  1. SELECT COLUMN, RAND() AS IDX
  2. FROM TABLE
  3. ORDER BY IDX FETCH FIRST 1 ROWS ONLY

Report this snippet  

You need to login to post a comment.