Select next rows from subquery result
It was easy to find a solution for getting the next row when having ONE id:
SELECT MIN(id) FROM foo WHERE id > ?
But what if I would like to have the next ids (plural) from a subquery
result? E.g.:
SELECT id FROM foo WHERE property > 0
These two Queries can't be combined, because the later one returns more
than one row, obviously.
How am I able to get all next ids from a subquery? Is it possible with a
single query or will I need to use procedures?
No comments:
Post a Comment