Tell her NO when she goes under the table and put her in her crate. Reinforce her crate as her resting/play area with lots of praise affection and treats. It'll take a lil time, but if your consistant patient and make it a positive experience, she'll get it.
Liz and Lilly