Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我知道它的顺序时,我想选择一条记录。
示例:我知道订单是 2(开始是 1)并且我想要获取记录有 id = 4(条件是 x 列 = 0)
id|name|x| 1 |a |0| 2 |b |1| 3 |c |2| 4 |d |0| 5 |e |3| 6 |f |0|
我该怎么做谢谢
用于limit将数据偏移 1
limit
select * from your_table where x = 0 order by id limit 1, 1