The flu shot protects against influenza, which isn't the same thing as the stomach flu (gastroenteritis). Gastroenteritis is an infection caused by a variety of viruses, including rotaviruses and noroviruses. Although it is often called the stomach flu, it is not caused by influenza viruses.
Real flu (influenza) attacks your respiratory system — your nose, throat and lungs — causing fever, muscle aches, coughing and congestion. Gastroenteritis, on the other hand, attacks your intestines causing signs and symptoms such as watery diarrhea, nausea, vomiting and stomach cramps.
No vaccine is available for gastroenteritis with the exception of two oral rotavirus vaccines — RotaTeq and Rotarix — for infants. However, you can reduce your risk of gastroenteritis by frequent and thorough hand-washing.
The annual flu vaccine is the most effective way to reduce your risk of getting influenza.