In male patients with type 2 diabetes, total testosterone (β: -0.058, 95%CI: -0.088, -0.028, p<0.001) and sex hormone binding globulin (β: -0.097, 95%CI: -0.134, -0.060, p<0.001) decreased. The gene discussed is SHBG; the disease is type 2 diabetes mellitus.