This is a tricky question. If the average force is really the same, what is going to change is impulse, the integral of force over time
$$J = \int_0^{\tau} F(t) dt \simeq F_{av} \tau$$
When you push the surface you interact with it for a longer time ($\tau$), while when you smack it you interact with it for a shorter time. So if the average force $F_{av}$ is the same, by increasing the interaction time you are going to deliver more energy to the system (the impulse will be greater).
You intuitively feel that smacking the table is more effective because it is usually easier to deliver more force by exploiting the kinetic energy of the object we are using to strike. Just think about "pushing" a baseball with the bat instead of hitting it: doesn't feel very effective, right?
Also, if your objective is to damage (or even break) the table, then probably it is best to hit it. This is because if the force is delivered in a relatively long time interval the material will have the time to bend and deform to absorb the energy without damage, while if the force is delivered in a short time it won't be able to do so and will usually suffer damage. Smacking water with your hands is an extreme example of what I'm saying, even though water won't obviously be damaged by the blow. Just think of breaking a small rock with an hammer: to break it by pushing it you will require a lot of force, but if you deliver a nice hit you will be able to smash it easily.