If you want the two halves to connect, but be able to separate them later for moving...
(1) Lash the two layouts together at the table height with carriage bolts (easily removable)
(2) Make sure that all 8 legs are on the floor -- no wobble. You may have to slide some shims under a leg or 2, then glue them onto the bottom of the leg. Better yet (but more work) -- install adjustable screw feet into the bottom of each leg. While you are doing this, make sure that both tables are level and meet at the same height -- so that the track can go across the junction without any vertical kinks.
(3) Any track that crosses the table joint will have a tiny (1/32" gap in both rails. If done neatly, trains will go across the joint without derailment. Then you will be able to disconnect the tables without removing any track. Try to make the track sections that cross the table joint straight. With curved track, derailments at the table joint could be more common. The easiest way to do this is to make he crossing track at right angles to the table joint. You can make the crossing track cross the table joint on a diagonal, but it will take more work to cut the track diagonally so that the rail-to-rail distance remains constant.
(4) For wires that cross the table joint, either (a) install plugs and sockets so that you can unplug them, or (b) put a terminal strip on one table and have the wires coming from the other table attached to the terminal strip. Make sure that everything is labelled. Then just unscrew the wires at the terminal strip to separate the tables.
(5) You can reduce the number of wires that cross the table joint by keeping the turnout controls (and block switches if you are doing DC) on each table with the turnouts (and blocks).