Re: how to randomnly select just 1 record from the table?

2004-06-22 Thread Egor Egorov
"Binay" <[EMAIL PROTECTED]> wrote:
> well i have only 4 records in the table. When i use below mentioned query it
> always return the same record irrespective of time delay. Now wht can i do?

What version of MySQL do you use?

> 
> Thanks
> Binay
> 
>> "Binay" <[EMAIL PROTECTED]> wrote on 21/06/2004 15:03:34:
>>
>>
>> > I need to select randomnly just one record from the table.
>> > how can i do? please help me out.
>>
>> SELECT * FROM tbl_name ORDER BY RAND() LIMIT 1 ;
>>



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




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



Re: how to randomnly select just 1 record from the table?

2004-06-21 Thread Binay
well i have only 4 records in the table. When i use below mentioned query it
always return the same record irrespective of time delay. Now wht can i do?

Thanks
Binay

> "Binay" <[EMAIL PROTECTED]> wrote on 21/06/2004 15:03:34:
>
>
> > I need to select randomnly just one record from the table.
> > how can i do? please help me out.
>
> SELECT * FROM tbl_name ORDER BY RAND() LIMIT 1 ;
>
> Alec
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>



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



Re: how to randomnly select just 1 record from the table?

2004-06-21 Thread Alec . Cawley
"Binay" <[EMAIL PROTECTED]> wrote on 21/06/2004 15:03:34:


> I need to select randomnly just one record from the table.
> how can i do? please help me out.

SELECT * FROM tbl_name ORDER BY RAND() LIMIT 1 ;

Alec

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



how to randomnly select just 1 record from the table?

2004-06-21 Thread Binay
Hi all

I need to select randomnly just one record from the table.
how can i do? please help me out.

Thanks in advance
binay