Reputation: 23
Hi could anyone help me with something?
I need a mysql query that can return 4 values from a column in some table, also select all fiels from each row.
something like:
SELECT * FROM dadoslivros WHERE RAND() =1 limit 100;
But i only want the random form row ID.
Thanks.
Upvotes: 0
Views: 34
Reputation: 247880
It seems like you just want to use ORDER BY RAND()
:
select *
from dadoslivros
order by rand()
limit 100
Upvotes: 1