successivo:
select * from foo where id = (select min(id) from foo where id > 4)
precedente:
select * from foo where id = (select max(id) from foo where id < 4)
successivo:
select * from foo where id = (select min(id) from foo where id > 4)
precedente:
select * from foo where id = (select max(id) from foo where id < 4)