In this comparative effectiveness study analyzing data from the US Department of Veterans Affairs and including 128 293 individuals with type 2 diabetes receiving metformin, use of sodium-glucose cotransporter 2 inhibitors was associated with reduced risk of all-cause mortality compared with sulfonylureas, regardless of cardiovascular disease status, estimated glomerular filtration rate category, and albuminuria status. This evidence concerns the gene SLC5A2 and type 2 diabetes mellitus.