Simply order by the random function, RAND(). For example:
FROM financial_affiliates AS aff
WHERE aff.state = 'wa'
AND aff.category = '3'
ORDER BY RAND();
From: Comcast [mailto:m.devries@stripped]
Sent: Wednesday, September 10, 2003 8:05 PM
Subject: how to do a random ORDER BY in a SELECT statement
I am querying a table and using the following statement:
SELECT * FROM financial_affiliates WHERE state = 'wa' AND category = '3'
ORDER BY name
I would like to ORDER BY RANDOM - is there an easy way to do that.