This idea I've known about for a long time and have always wanted to implement it somewhere in my home. I've just never gotten around to it. Martha Stewart left directions on exactly how to do this. (What would we do without Martha?)
1. Unscrew the extension mechanism from the bottom of the table. Remove the part of the table you won't be using.
2. Sand the remaining part, then prime and paint it.
3. Nail or screw a two-by-two-inch piece of wood to the wall at the height of the tabletop so that the edge of the table rests on the wood support.
4. Screw through the top of the table to the wood support; fill the holes with wood filler, and paint over them.