selanjutnya:
select * from foo where id = (select min(id) from foo where id > 4)
sebelumnya:
select * from foo where id = (select max(id) from foo where id < 4)
selanjutnya:
select * from foo where id = (select min(id) from foo where id > 4)
sebelumnya:
select * from foo where id = (select max(id) from foo where id < 4)