zoukankan      html  css  js  c++  java
  • 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
     
  • 相关阅读:
    软链接
    yum
    vm
    tengine
    创智LIUNX
    作业11
    作业10
    作业9
    作业8
    作业7
  • 原文地址:https://www.cnblogs.com/geniussoft/p/5691006.html
Copyright © 2011-2022 走看看