Selecting a Random Row In IBM DB2


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  1. SELECT COLUMN, RAND() AS IDX
  2. FROM TABLE
  3. ORDER BY IDX FETCH FIRST 1 ROWS ONLY

Report this snippet


Comments


You need to login to view comments.