I am running a select SQL query:
select * from table where sequence = '6'
i want to be able to get the next row however it may not be sequence 7, as this may not exist.
if the next row is sequence 9 how would i select it?
Order by sequence and use limit to define an offset of 1
select * from your_table
where sequence >= 6
order by sequence
limit 1, 1
sequence = 6I don't know if this can help...
select * from table where sequence > '6' order by sequence ASC limit 0,1