方法一
select * from tbl
order by checksum(rand()*class), checksum(rand(),name)
方法二
select * from tbl
order by checksum(rand()*class), newid()
注:checksum(rand()*class) 这个要求class必须是数字,要是非数字值,就不行了
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交