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
 
posted @ 2016-07-21 11:06  微明Axel  阅读(1050)  评论(0编辑  收藏  举报