SGLT2 inhibitors were the only antihyperglycaemic therapy negatively associated with pancreatic cancer risk in the overall study population (OR: 0.80; 95% CI: 0.74–0.87 per year of therapy) and in the age- and sex-stratified subgroups. Here, SLC5A2 is linked to familial pancreatic carcinoma.