select cast(ceiling(rand(checksum(newid()))*10) as int) as RndId from 表名  

 

相关文章: