There are many solutions to your problem, but this is the way I would do it. I would use a "threaded insert" on the table portion of the legs and a machine bolt or screw on the removable part of the leg. See below for an example of a 3/8" threaded insert: http://www.constantines.com/product.asp?0=234&1=233&3=576
A 1/4 inch insert may work fine.
Drill a hole through the center of the removable part of the leg and countersink it on both sides. Insert a bolt that matches the threads of the insert through the hole in the removable leg. There should be a washer under the bolt head and a washer plus two nuts on the other end of the bolt. The bolt head and nuts should all be countersunk below the surface of the removable leg, and the bolt should extend out to the depth of the threaded insert. Drill the correct size hole for the threaded insert (to prevent splitting of the wood). Thread the insert into the main leg portion, remove it, coat the outside of the threads with epoxy, and re-insert it into the main leg portion. Make certain that you don't get epoxy inside the threads!
The removable leg portions should screw easily onto the main leg portions.