1.随机获取n条数据

select top 200 * from tableName

这时每次运行取到的数据都是一样的,如果想要不一样的,如下

select top 200 * from tableName order by newid()

2.随机获取10%数据

select top 10 percent * from tableName

 

相关文章:

  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2022-01-29
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2021-07-06
猜你喜欢
  • 2021-06-16
  • 2022-01-25
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2021-10-15
  • 2022-12-23
相关资源
相似解决方案