BACKGROUNDPrevious studies on Clostridioides difficile infection (CDI) in proton pump inhibitor (PPI) users generally enrolled a heterogeneous population and did not include a control group of histamine H2 receptor antagonists (H2RAs) users or adjust for confounding variables, such as previous antibiotics. It is uncertain whether hospitalized patients using PPIs for stress ulcer prophylaxis (SUP) are at a higher risk of CDI compared with those using H2RAs. This study aimed to compare the association between CDI and the usage of antisecretory drugs (ASDs): PPIs and H2RAs, for SUP among hospitalized patients, and the impact of the duration of their use on CDI.METHODSIn this nationwide population-based cohort study using the Taiwan National Health Insurance Database, hospitalized patients using ASDs for SUP were identified between 2017 and 2018. A total of 63,266 and 69,269 individuals were included in the PPI and H2RA groups, respectively. The primary endpoint was a 90-day monitoring of CDI occurrence.FINDINGSThe incidences of CDI were 1.6/10,000 and 0.5/10,000 person-days in the PPIs and H2RAs groups, respectively. After adjusting for confounding factors, the risk of infection in the PPIs group remained significantly higher than in the H2RAs group (hazard ratio (HR), 2.49; 95% confidence interval (CI), 1.63-3.81). In the subgroup analysis, during hospitalization, the risk of CDI for patients using high-risk antibiotics or admitted to the intensive care unit (ICU), as well as patients with immunodeficiency, using PPIs for SUP, was higher than using H2RAs. Furthermore, the risk of CDI was higher in patients using ASDs for durations >14 days than in those using them for <7 days (adjusted HR, 3.66; 95% CI, 2.34-5.75).CONCLUSIONSThe risk of occurrence CDI for hospitalized patients using PPIs for SUP was higher than using H2RAs. It is recommended not to exceed 14 days of any gastric ASDs for SUP during hospitalization, especially for patients who have used high-risk antibiotics, have been admitted to the ICU, or have immunodeficiency.