Update query to set random data

2005-07-01 Thread zzapper
Hi, In order to generate some useful test data eg randomnly setting the flag select_normal to 0 or 1 use the following update tbl_products set select_normal=round(rand()); I've actually answered my own question (as usual in formulating the question you often can workout the answer) But anyone

Re: Creating random data in a test table based on an existing tab le

2003-11-13 Thread Olof Tjerngren
: Creating random data in a test table based on an existing table How about somethine like this as a starting point: insert into testuser (firstname,lastname) select u1.firstname,u2.lastname from user u1, user u2 order by rand() limit 1; MvH, Luis Lebron wrote: > I have an users ta

RE: Creating random data in a test table based on an existing tab le

2003-11-11 Thread Luis Lebron
Thanks for the help. I tried your suggestion but only got 1 row inserted in the test table. Luis -Original Message- From: Olof Tjerngren [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 3:01 AM To: Luis Lebron Cc: Mysql (E-mail) Subject: Re: Creating random data in a test table

Re: Creating random data in a test table based on an existing table

2003-11-11 Thread Olof Tjerngren
about 1500 records. I would like to create a test table (i.e. users_test) with 10,000 records based on random data from the first table (i.e. random first name combined with a random last name, etc...). Is it possible to do this via a MySQL query? Luis R. Lebron Sigmatech, Inc -- MySQL General

Creating random data in a test table based on an existing table

2003-11-10 Thread Luis Lebron
I have an users table for a php application that I am programming. The current users table has about 1500 records. I would like to create a test table (i.e. users_test) with 10,000 records based on random data from the first table (i.e. random first name combined with a random last name, etc

Re: random data

2003-09-15 Thread Egor Egorov
"tuncay bas" <[EMAIL PROTECTED]> wrote: > > excuse me > > have can I get from mysql database random 6 data item? Take a look at the RAND() function: http://www.mysql.com/doc/en/Mathematical_functions.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita Th

random data

2003-09-15 Thread tuncay bas
excuse me have can I get from mysql database random 6 data item?