CoderZone.org

Category: >> mySQL >> Add random numbers to columns Bookmark and Share

<< lastnext >>

Snippet Name: Add random numbers to columns

Description: Add random numbers within a pre-selected range to a given column.

Comment: (none)

Author: CoderZone
Language: MYSQL
Highlight Mode: MYSQL
Last Modified: February 28th, 2009

UPDATE 'some_table'  SET some_column = FLOOR(RAND() * 21) + 122;
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 3