次へ:
select * from foo where id = (select min(id) from foo where id > 4)
前:
select * from foo where id = (select max(id) from foo where id < 4)
次へ:
select * from foo where id = (select min(id) from foo where id > 4)
前:
select * from foo where id = (select max(id) from foo where id < 4)