My guess is that outside trim is the type that pushes into a groove cut in the
wood. As such, I would pull out the trim and seal the
wood with
epoxy... otherwise for outdoor use
water will get in there and then swell the wood ruining the table.
The trim is readily available, or you could re-use what you have.... you may find when you reinstall it that it meets on the end... or not! If you replace it, let the table and new trim sit out in the
environment you intend to have it in. so any shrinkage or expansion occur prior to cutting. I would cut it in cold
weather rather than hot.
You could fill the gap with a hardening sealer like white 5200, or other type. Some sealers like 5200 will yellow slightly in the sun though.
When reinstalling the trim you could coat it all with
sealant, wiping the edges clean prior to hardening.