che fà la funzione floor?
Altra cosa (per pura curiosità)...se provo a castare ad int il valore dato da rand() non mi funziona...com'è?
mysql> SELECT CAST(RAND() AD int);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near 'AD int)' at line 1
mysql>