如何获取某天指定位置的数据
某表按时间排列插入N条数据,怎么样获得第X条数据
用 select top @index * from table order by 时间
会返回多余的数据,如何只返回一条?
[解决办法]
select * from
(select ind = row_number()over(order by 时间), * from table) t
where ind=@index
发布时间: 2013-03-22 09:49:50 作者: rapoo
如何获取某天指定位置的数据
某表按时间排列插入N条数据,怎么样获得第X条数据
用 select top @index * from table order by 时间
会返回多余的数据,如何只返回一条?
[解决办法]
select * from
(select ind = row_number()over(order by 时间), * from table) t
where ind=@index