2014-03-03 42 views

回答

4

您可以updaterand()做到這一點:

update user 
    set avatarid = floor(1 + rand() * 7) 
    where avatarrevision = 0; 
+0

完美!萬分感謝! – user1610904

-1
UPDATE user SET avatarid = avatarid + FLOOR(RAND() * (1)) + 7 where avatarrevision = 0; 
相關問題