Sugar damaege to teeth

When you drink a sugary drink does it cause damage to your teeth because it touches them while its in your mouth? That must sound like a simple question, but I was wondering if it could cause your teeth damage somehow after it has been swallowed?

I would think that it is because the bacteria on your teeth feed on the sugar.

One study suggests sugar is the sole cause of tooth decay:

WebMD clarifies that it’s “carbs” rather than just sugar itself but close enough.

What happens is that bacteria in your mouth feed off of the carbs, and produce acid as a waste product, and having high levels of acid in your mouth is what eats away at your teeth causing them to rot. WebMD suggests that eating and drinking substances high in acid also damage teeth, and most sodas are high in acid as well. Hence why a base like baking soda is said to help protect teeth.

A detailed explanation about how tooth decay occurs can be read on Wikipedia: