SELECT sh1.* FROM fw_share AS sh1 JOIN (SELECT ROUND( RAND() * ((SELECT MAX(share_id) FROM fw_share)-(SELECT MIN(share_id) FROM fw_share)) + (SELECT MIN(share_id) FROM fw_share) ) AS share_id) AS sh2 WHERE sh1.share_id>=sh2.share_id
?
http://my.oschina.net/sharephper/blog/100104