Tanner Postert wrote:
so if i have a list of records...

id name other

1  water H2O
2  water aqua
3  water liquid


so i want to select other where name = 'water'

but i want to only return 1 result, and for that result to be a random
value. is there a way to sort by rand() ?

Yes.

Funnily enough:

select * from table order by rand();

If you only want one result:

select * from table order by rand() limit 1;

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to