MySQL Forums
Forum List  »  General

Re: Generating a random value...
Posted by: Bob Field
Date: July 25, 2006 01:28PM

You can do it with a single SQL statement:
INSERT INTO newtable
SELECT itemName1, rand()*(value1_max-value1_min)+value1_min
FROM oldtable;



Edited 1 time(s). Last edit at 07/25/2006 01:36PM by Bob Field.

Options: ReplyQuote


Subject
Written By
Posted
Re: Generating a random value...
July 25, 2006 01:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.