This cohort study including 31 852 patients with diabetes monitored for 5 years and using clinical data analysis found that treatment with either a glucagon-like peptide-1 receptor agonist, sodium-glucose cotransporter-2 inhibitor, or dipeptidyl peptidase-4 inhibitor added to metformin monotherapy was effective compared with a sulfonylurea in maintaining glycemic control, with glucagon-like peptide-1 receptor agonist being more effective than dipeptidyl peptidase-4 inhibitor. This evidence concerns the gene GLP1R and diabetes mellitus.