This cohort study compares the risk of all-cause mortality in individuals using sodium-glucose cotransporter 2 inhibitors vs sulfonylureas in combination with metformin for treatment of type 2 diabetes. This evidence concerns the gene SLC5A2 and type 2 diabetes mellitus.