While an intravenous injection of some anesthetics can knock out a person in under 30 seconds, an intramuscular injection—which is the only kind you're going to get on a person who's resisting vigorously—can take upwards of 15 minutes or more. Think of all the safari shows where they trail after the tranked wildlife waiting for the drug to finally take effect.
However, this is never fast enough for television—which has, after all, only 40 minutes (after commercials and credits) to present a one hour drama. Thus, every anesthetic gets upgraded to "instant effect". Exceptions: when the spreading muscular paralysis can be played for laughs or the writers want to show that a character or animal is extremely tough. In the latter case, multiple darts/injections may be used to speed up the process, apparently without risk of fatal overdose.
Likewise, goons using rags soaked with chloroform or ether to subdue and then kidnap some soon-to-be Damsel in Distress is a staple of pulp detective novels, and similar scenes have occurred not infrequently in movies and on television. But in real life, rendering someone unconscious that way not only tends to take several minutes, but also from time to time kills the intended victim (Don't Try This At Home. Seriously).
If a mook or a hero wants to sedate a large number of people at once, they may rely on Knockout Gas (which is frequently some highly visible color, like red or yellow). The person doing the gassing might take the effort to put a mask over their own face, but just as often will simply cover their nose. Fortunately for them, Knockout Gas almost always works instantly, and can be highly selective at times, affecting only the intended victims and leaving the gasser and his/her allies alone. In shows and cartoons where gun-like weapons and hypodermic needles aren't allowed, Knockout Gas often becomes the primary weapon of choice for both heroes and villains alike.
These sorts of gases really exist (although slower working), but the most recent attempted use in the 2002 Moscow theatre siege was a disaster, killing a lot of hostages as well.
Different doses of sedatives vary in effects depending on the body mass of people. So if you put in enough to knock out even the hardiest of people (terrorists tend to be muscular men...), you'll kill some children and women, who have lower body mass. If you use a dose that won't kill anybody, the high-mass people won't get rendered unconscious, and are still dangerous.
Its also important to note that there is a difference between paralytics and sedatives. Large (read massive) doses of paralytics and paralytic gasses can actually work similarly to the way fiction would like tranquilizers to work. The catch is that paralytics stop all voluntary muscles dead, which includes the ones that work your lungs. In medicine they are very useful when you are standing by to take over the job of breathing for the person, but unless you plan on carrying around a rapid sequence intubation kit and training your mooks to use it, it's a less than perfect solution in real life.
Possibly more realistic in series set in The Future, but we won't know until we get there.
In reality, whilst there are, of course, drugs that can render a person unconscious, the problem lies in the delivery system. A medicine given intravenously (injected directly into the bloodstream) can act on the brain within moments. A drug injected anywhere else (skin, muscle, or fat being the chief alternatives) takes effect in minutes to hours.
Nor is it possible even for a practiced and steady hand to forcibly stab someone with a needle in, say, the neck, and hit an artery or vein. They are quite small relative to the size of the neck, and every person's anatomy is different. A doctor creeping up behind a person with a syringe would hit a blood vessel only by blind luck. The same is true of a tranquilizer dart. Both are used in real life (though the shoulder or the buttocks are used when injecting a person against their will, not, for obvious reasons, the neck.) But they take several minutes, at a minimum, to take effect.
Also note that in general, a medication which produces perfect unconsciousness also produces apnea—which is to say, the victim stops breathing. Calming a person with a sedative is one thing—but the total oblivion seen in TV and movies is typically only induced by the medical profession when they intend to support the patient's breathing via a bag-valve mask or a ventilator.
There are also areas of the body where it is incredibly stupid to stab someone with a hollow needle, while often in fiction this is disregarded. Also the drug make-up for intramuscular serum and intravenous serum can be different depending on the drug, with both IM and IV injections needing to be injected carefully to avoid bruising and missing the target.
NOTE: There are a few problems with injecting something into an artery which fiction seems to forget sometimes: 1) it will first travel down to the capillary network it supplies before being taken up by the venous network to be returned to the heart, which is incredibly inefficient and will probably damage the peripheral tissues if exposed immediately to a high concentration, 2) arteries have thick external layers of elastic (elastin and collagen fibres) which are difficult to penetrate with a syringe, 3) if you perforate an artery with a syringe, it will bleed, A LOT. Remember folks, there is a reason why it's called intravenous. Veins are your friend.