当前位置:
代码迷
>>
Sql Server
>> 怎么获取某天指定位置的数据
详细解决方案
怎么获取某天指定位置的数据
热度:
94
发布时间:
2016-04-24 23:17:04.0
如何获取某天指定位置的数据
某表按时间排列插入N条数据,怎么样获得第X条数据
用 select top @index * from table order by 时间
会返回多余的数据,如何只返回一条?
------解决方案--------------------
select * from
(select ind = row_number()over(order by 时间), * from table) t
where ind=@index
相关解决方案