Posted by Toby A Inkster on 03/06/07 09:29
raj wrote:
> Is there a query which will select x random unique records out of all records
> and sort them randomly,
To select 10 random records from table "my_table":
SELECT *
FROM my_table
ORDER BY random()
LIMIT 10;
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|