This cohort study assesses the association of sodium-glucose cotransporter 2 inhibitors vs other second-line glucose-lowering medications with the development and incidence of diabetic retinopathy in adults with type 2 diabetes in Taiwan. Here, SLC5A2 is linked to type 2 diabetes mellitus.