First -- congrats on a happy girl! This stage will pass especially if you don't give her attention for the throwing. She will tire of it if you don't make it into a power struggle!
The book "How to Talk so Kids Will Listen and Listen so Kids Will Talk," as someone noted, is well-regarded.
She is only two and is exploring how far she can go with things, plus, at two -- barely out of babyhood, really -- the throwing is simply fun, and gets your attention. Even negative attention is still attention and kids want it.
When she throws the first thing, say firmly, "This is the warning. Do not throw things. If you throw again, you have to leave the table." If she throws again, say, "You are finished with dinner because you threw that." Nothing else! Silently remove her, even if you have to pick her up, and take her out of the dining room, even if she is mid-bite. Instant, calm, no-yelliing, firm removal. You may have to do it lots of times but if it's very consistent she will get that throwing equals instant removal and NO reactions from mom and dad. Yelling or talking is a reaction; deny her that, but calmly. You may need to follow with time outs but very brief ones -- Books by "Supernanny" Jo Frost are good on how to structure and enforce time outs that work.
But I want to add to all that, as someone else said -- at age two it is too much to ask her to sit through you adults finishing your meals, so perhaps let her leave the table when she is done. Ask yourself -- is the throwing happening mostly once she's done eating and is getting bored and restless? You might not even have to do the removal routine if you let her leave the table when she is done.
Talk to your husband about the difference on spanking. Stick to your guns about not spanking or even "popping" your child "just once, just on the bottom."
Try this with him: At some point we all have to tell a kid, "Don't hit!" How could he ever tell her "Don't hit!" if he hits her himself? It's the ultimate hypocrisy. And even that "little pop on the butt" is a hit. You can't teach a child not to hit by hitting. That confuses them and lets them know that the adults they love and trust consider it acceptable to touch them in order to cause pain. On purpose. It doesn't teach them any new or different BEHAVIORS, but only teaches them that they are legitimate targets for physical pain from those they trust.