Generally, you need to fast for 6 to 8 hours before having a colonoscopy. After doing colonoscopy, if only a simple examination is performed, a light diet should be observed within 24 hours; if invasive examinations such as intestinal polypectomy, hemostasis, biopsy, etc. are performed, fasting should be done for 12 hours. 1. Before doing colonoscopy: patients need to fasting, fasting for 6 to 8 hours during the intestinal examination, and can only eat low-fiber, non-slag food for 2 to 3 days before the examination. If patients do not fast, it will lead to fecal residue in the intestines, which will affect the vision of colonoscopy and lead to the inability to better observe the situation in the intestines. 2. After doing colonoscopy: (1) Only simple intestinal examination: because the intestinal tract is more sensitive and fragile, you should pay attention to a light diet within 24 hours, and eat less hard food such as peanuts, melon seeds and so on. (2) Fasting time and type of food should be decided according to the specific operation, size of trauma, severity of bleeding, whether to apply titanium clips, etc., and in accordance with medical advice.