Stomach pain farting is often caused by improper diet, chronic gastroenteritis, indigestion and other factors, can be adjusted through the diet and medication and other ways to relieve symptoms. 1. Chronic gastroenteritis. Stomach pain and farting can be caused by chronic gastroenteritis, the overgrowth of gas-producing bacteria in the digestive tract leads to increased intestinal gas production, and the patient may also be accompanied by abdominal pain, abdominal distension and other symptoms, which can usually be relieved after defecation and evacuation. Proton pump inhibitors need to be given to inhibit gastric acid, mosapride to promote gastrointestinal peristalsis, gastric mucosal protective agent to protect the gastric mucosa and other treatments. 2. Improper diet. If the patient eats too much soybean products and other foods, the decomposition of the digestive tract will produce ammonia and other gases, which will also cause digestive bloating and pain, gas and other symptoms. Patients can adjust the diet structure, eat more vegetables, millet porridge, pumpkin porridge and other easily digested and absorbed food, and avoid staying up late to avoid the abdomen and stomach cold. 3. Indigestion. Dyspepsia is often caused by a combination of infections, genetic and psychological factors, accompanied by abdominal pain, bloating, belching, increased exhaust and other symptoms of a clinical syndrome. Patients can improve their lifestyles and adjust their dietary structure and habits to alleviate their symptoms, and if necessary, they can be given medications to inhibit acidity, promote gastrointestinal motility, and supplement intestinal probiotics. If the symptoms of stomach pain and farting persist, it is recommended to go to the hospital in time to identify the cause of the disease and then treat the symptoms.