DPP4 and dementia: This study was the first to compare the effects of GLP-1 agonists, DPP-4 inhibitors, and sulfonylureas on the risk of dementia in older patients with T2DM, using a large sample from nationwide registers and an emulated trial design.