mysql怎么查询一条记录的前一条记录和后一条记录

上一条:select * from 表 where 数据id<@当前显示数据id order by 数据_id asc) limit 1
下一条:select * from 表 where 数据id>@当前显示数据id order by 数据_id desc) limit 1 

mysql 里面不支持 select top
 
原文地址:https://www.cnblogs.com/geniussoft/p/5691006.html