Ver Mensaje Individual
  #6 (permalink)  
Antiguo 13/02/2006, 07:10
Avatar de deadlykyo
deadlykyo
 
Fecha de Ingreso: noviembre-2005
Ubicación: Cbba - Bolivia
Mensajes: 747
Antigüedad: 18 años, 5 meses
Puntos: 5
aqui te dejo el link a la documentacion de RAND() de mysql y tambien te dejo un ejemplo de como generar indices entre un rango, que podia ser el inicio=1 y el fin=MAX(id) de tu tabla:
http://dev.mysql.com/doc/refman/5.0/...functions.html
Código:
RAND(), RAND(N)

Returns a random floating-point value v between 0 and 1 inclusive (that is, in the range 0 <= v <= 1.0). If an integer argument N is specified, it is used as the seed value, which produces a repeatable sequence.

mysql> SELECT RAND();
        -> 0.9233482386203
mysql> SELECT RAND(20);
        -> 0.15888261251047
mysql> SELECT RAND(20);
        -> 0.15888261251047
mysql> SELECT RAND();
        -> 0.63553050033332
mysql> SELECT RAND();
        -> 0.70100469486881
mysql> SELECT RAND(20);
        -> 0.15888261251047

To obtain a random integer R in the range i <= R <= j, use the expression FLOOR(i + RAND() * (j – i + 1)). For example, to obtain a random integer in the range of 7 to 12 inclusive, you could use the following statement:

SELECT FLOOR(7 + (RAND() * 6)); 
cya
__________________
"El Conocimiento es de todos, no solo de algunos"