If my DD cannot sit or at least be quiet, her meal is over and she has to leave the table. If there is anything special, she cannot have it. No pumpkin pie, no cupcakes, no strawberry flavored milk. Nothing special before bed.
If she is throwing things, she gets to sit in time out, which she hates.
When the big kids were small, DH used 3 pennies and a small glass cup. If they acted up, he brought the glass over and dumped it out. That was 1. If all the pennies went in the cup, then the child was removed from the table and had to go to his/her room. It was very useful with company around. Obviously he trained them about this cup before it was really effective, but in all our years, I only saw the cup get filled once. SD would smarten up because her antics were often to get the attention of the guest and if she had to leave, she could not get any attention.
We are also working on "may I be excused, please?" with our youngest which is how nice little girls ask to leave the table, not by throwing things.
I would also sit them so the 2 yr old is in a booster with a strap or otherwise restrained at the table (we use our highchair pulled to the table to give DD enough height). Then put them so it's parent-child-parent-child and they cannot touch each other.
Do not feel bad for teaching your children manners.