List:General Discussion« Previous MessageNext Message »
From:Eamon Daly Date:February 11 2004 12:27pm
Subject:Re: Query Question
View as plain text  
SELECT * FROM test ORDER BY RAND() LIMIT 1;

See pp. 694-695 in the MySQL Cookbook.

____________________________________________________________
Eamon Daly
NextWave Media Group LLC
Tel: 1 773 975-1115
Fax: 1 773 913-0970



----- Original Message ----- 
From: "Jack Lauman" <jlauman@stripped>
To: "MySQL Mailing List" <mysql@stripped>
Sent: Wednesday, February 11, 2004 5:47 AM
Subject: Query Question


> I have a table containing information about different businesses.  I
> want to randomly select a single row from the table using a prepared
> statement in a java bean.
> 
> What is the most eficient way to do this?
> 
> TIA
> 
> Jack

Thread
Query QuestionJack Lauman11 Feb
  • Re: Query QuestionEamon Daly11 Feb
  • Re: Query QuestionAlec.Cawley11 Feb