Sql server:

    select top 10 * from 表 order by newid()

Access:

    SELECT top 10 * FROM 表 ORDER BY Rnd(id) 

Rnd(id) 其中的id是自动编号字段,可以利用其他任何数值来完成

比如用姓名字段(UserName)

    SELECT top 10 * FROM 表 ORDER BY Rnd(len(UserName)) 

MySql:

    Select * From 表 Order By rand() Limit 10

相关文章:

  • 2021-07-08
  • 2021-06-16
  • 2021-09-08
  • 2021-06-27
  • 2022-12-23
  • 2021-10-19
  • 2022-02-09
  • 2022-01-05
猜你喜欢
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
相关资源
相似解决方案