I have thought on this same issue myself. An adjustable height table that could grow with kids.
Trying to describe it …
Create a tabletop with legs, say 2″x2″. These would not be decorative, as they would really be pistons.
Create 4 leg surrounds (decorative?) that would tightly slide over the tabletop pistons. They could be attached to each other by stretchers to improve their sturdiness.
The surrounds would have pegged holes at appropriate heights to allow the tabletop pistons to sit on. As the child grows, the pegs could be moved up to raise the table height.
A table with 24″ surrounds could probably be raised to 42″ before becoming wobbly due to lack of support. I think typical adult table height is about 30″. You’d need to factor in the extra height for the tabletop thickness.
The surrounds could only be as tall as the table’s lowest setting.
The table could only be raised less than 2x the height of the surrounds.
I may be a bit off in my measurements, as I haven’t thought the concept fully through.