In a nationwide cohort of patients with T2D and AF, SGLT2 inhibitor was associated with a lower risk of mortality, which may suggest that SGLT2 inhibitors may be considered as the first-line antidiabetic medication in patients with T2D and AF. Here, SLC5A2 is linked to atrial fibrillation.