输入banner图图片脚本导航/分类

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  

 

 

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

标签: