mysql查询表中前一条和后一条数据

标题 1.查询前一条记录: select * from 表名 where id = (select id from 表名 where ranking < #{ranking,jdbcType=BIGINT} order by ranking desc limit 1); 2.查询后一条记录: select * from 表名 where id = (select id fr
相关文章
相关标签/搜索