My apartment is really small and we have hardly any space for things like computer tables. My son still needed one though, so I decided to try and build one with the goal of maximising space. I scrounged a book shelf and shelf mounts and went to work. I'm pretty happy with the end result. The table slots onto the end of the bed and can optionally be screwed to it via the shelf mounts.
Now my kids lay in bed while watching youtube. How's my parenting -- LOL.