Injecting a spasming/fighting person

Lots of TV shows and movies show doctors sticking a syringe in a person who appears to be spasming, vibrating, convulsing, or actively wrestling. I would generally think that having a 1 millimeter thick piece of metal stuck into you as you moved about be a good recipe for having a chunk of metal getting broken off inside or a pretty good gash.

In real life do medics do this, or do they use those air-injection things instead, or do they just get the people tied down a lot firmer than is generally shown in TV shows?

Speaking from personal experience (I work in an in-patient unit, and we often have to give shots to people that are fighting us) we generally immobilize as best we can before doing the shot. Get limbs under control, have someone controlling the torso, etc. Usually when we have to do an involuntary injection we try to go in with no fewer than 5 people.