SQL如何获取上一条..下一条..首尾记录

下一条:
select top 1 from tb 
where id > 知道的ID值
order by id asc

上一条:
select top 1 from tb 
where id < 知道的ID值
order by id desc 
 
原文地址:https://www.cnblogs.com/ybbqg/p/2405540.html