SELECT all rows with sequential id after a specific id
A query that doesn't use recursive CTEs or window functions or variables:

SELECT i.* 
FROM Inheritance AS i
    JOIN
    ( SELECT ui.id 
      FROM Inheritance AS ui
      WHERE ui.id &gt; 5
        AND NOT EXISTS
            ( SELECT 1
              FROM Inheritance AS pi
              WHERE pi.id = ui.id - 1
            ) 
      ORDER BY ui.id
      LIMIT 1
    ) AS up
    ON  i.id &lt; up.id
WHERE i.id &gt; 5 ;