In people aged ≥ 60 years with type 2 diabetes, SGLT2 inhibitor versus DPP4 inhibitor initiation was associated with lower risk of all-cause dementia, and the observed risk reduction was greater with continuous use. This evidence concerns the gene DPP4 and type 2 diabetes mellitus.