Appendectomy for an inflammatory condition (appendicitis or lymphadenitis) but not for nonspecific abdominal pain is associated with a low risk of subsequent ulcerative colitis. This inverse relation is limited to patients who undergo surgery before the age of 20 years.
Andersson et al. (2001) studied this question.