To generate random integers from min to max, including min and max
SELECT FLOOR( RAND()*( Max - Min + 1 )) + Min;
Example: To create a random integer between 5 and 10
SELECT FLOOR( RAND()*( 10 - 5 + 1 )) + 5;
To generate random integers from min to max, including min and max
SELECT FLOOR( RAND()*( Max - Min + 1 )) + Min;
Example: To create a random integer between 5 and 10
SELECT FLOOR( RAND()*( 10 - 5 + 1 )) + 5;