An upper gastrointestinal endoscopy is a way for your doctor to look at the inside lining of your esophagus, stomach, and the first part of your small intestine (called the duodenum). The doctor uses a thin, flexible viewing instrument called an endoscope. With the endoscope, your doctor can check to see if you have any ulcers, inflammation, tumors, infection, or bleeding.
This test is also known as an esophagogastroduodenoscopy, or EGD.
WebMD Medical Reference from Healthwise