SQL Server : how to select a fixed amount of rows (select every x-th value)

后端 未结 2 906
没有蜡笔的小新
没有蜡笔的小新 2021-01-06 09:22

A short description: I have a table with data that is updated over a certain time period. Now the problem is, that - depending on the nature of the sensor which sends the da

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-06 09:52

    One more option to consider:

    Select Top 1000 * 
    From dbo.SomeTable 
    Where ....
    Order By NewID()
    

    but to be honest- like the previous answer more than this one. The question could be about performance..

提交回复
热议问题