select top 10 * from tablename order by newid()

解决方案 »

  1.   

    select top 10 * from table order by newid()不过有人建议不要这样用,没看明白中
      

  2.   

    to:newly_ignorant(不学无术) 
    是速度问题,既然要随机就不应该怕全表扫描。
      

  3.   

    select top 10 * from table
    where id in (select distinct round(rand()*id,0) from table)
    ID为记录的键值。
      

  4.   

    不好意思,太复杂,并且有点不对,还是NewId的好