An upper endoscopy in a procedure to examine the upper part of your digestive system that includes the esophagus (food pipe), stomach and duodenum (first part of the small intestine). During the procedure, a flexible tube with a built-in camera is inserted through the mouth into your stomach and first part of the small intestine. This procedure helps in detecting ulcers, inflammation, bleeding and other upper intestinal disorders.