Posted By

xtheonex on 01/27/09


mysql sql

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Select random row from a SQL database.

 / Published in: SQL

This is by no means the most efficient way to do this, in terms of performance. It is however the easiest way.

  1. SELECT * FROM `table` ORDER BY rand() LIMIT 1

Report this snippet  

You need to login to post a comment.