mysql select random id from table
snippet in sql

mysql select random id from table

user5624

-- randomly order, select first 5 rows
select * from `table_name` order by rand() limit 5