MySQL select before after row

前端 未结 4 1324
北荒
北荒 2020-12-15 08:28

This is the example table:

Column             | 1st record | 2nd record | 3rd record | 4th record | etc
id (primary) | 1 | 5
4条回答
  •  情话喂你
    2020-12-15 08:57

    select *
    from callvalue
    where id <  maxd
    (
    select max(id) as maxd
    from callvalue
    where id = maxd
    )
    

提交回复
热议问题