34,590
社区成员
发帖
与我相关
我的任务
分享
-- 用一个子查询 ,先取第次小、二小 两条记录(top 2 ) ,再反向排序,取第一个 top 1
-- 大概如下,没有测试过。
select top 1 * from (select top 2 from t where time >'111' order by time desc) x order by time asc
-- 加单引号
where time > '13:30' order by time desc